302 #define kList_ItemType_(LIST) kxList_ItemType_(LIST)
303 #define kList_Count_(LIST) kxList_Count_(LIST)
304 #define kList_Capacity_(LIST) kxList_Capacity_(LIST)
306 #define kList_First_(LIST) kxList_First_(LIST)
307 #define kList_Last_(LIST) kxList_Last_(LIST)
309 #define kList_Next_(LIST, ITEM) kxList_Next_(LIST, ITEM)
310 #define kList_Previous_(LIST, ITEM) kxList_Previous_(LIST, ITEM)
312 #define kList_At_(LIST, ITEM) kxList_At_(LIST, ITEM)
315 #define kList_As_(LIST, ITEM, TYPE) kxList_As_(LIST, ITEM, TYPE)
319 #include <kApi/Data/kList.x.h>
kStatus kList_SetItem(kList list, kListItem item, const void *content)
Sets the content associated with a list item.
kStatus kList_Add(kList list, const void *itemContent, kListItem *item)
Adds a new item to the end of the list.
kType kList_ItemType(kList list)
Returns the item type.
Represents a void pointer.
kListItem kList_Last(kList list)
Gets a reference to the last list item.
kListItem kList_FindIndex(kList list, kSize index)
Finds a reference to the list item at the specified index.
Represents an unsigned integer that can store a pointer address.
Abstract base class for memory allocator types.
kStatus kList_Assign(kList list, kList source)
Performs a shallow copy of the source list.
kStatus kList_Construct(kList *list, kType itemType, kSize initialCapacity, kAlloc allocator)
Constructs a kList object.
kStatus kList_Insert(kList list, kListItem before, const void *itemContent, kListItem *item)
Inserts an item into the list before the specified list item.
kStatus kList_Remove(kList list, kListItem item)
Removes the specified item from the list.
kStatus kList_Purge(kList list)
Disposes any elements in the list and sets the count of list items to zero.
kStatus kList_Clear(kList list)
Sets the count of list items to zero.
kStatus kList_Item(kList list, kListItem item, void *content)
Gets the content associated with a list item.
Essential API declarations.
kStatus kList_Reserve(kList list, kSize capacity)
Ensures that capacity is reserved for at least the specified number of list items.
kSize kList_Capacity(kList list)
Returns the number of elements for which space has been allocated.
kSize kList_Count(kList list)
Returns the count of list elements.
Represents metadata about a type (class, interface, or value).
Represents a doubly-linked list.
Represents an enumeration of error codes.
void * kList_At(kList list, kListItem item)
Returns a pointer to the content associated with a list item.
kStatus kList_Allocate(kList list, kType itemType, kSize initialCapacity)
Reallocates the list.
void * kList_AtIndex(kList list, kSize index)
Returns a pointer to the content associated with a list item at the specified index.
kListItem kList_Previous(kList list, kListItem item)
Given a list item, gets a reference to the previous list item.
kListItem kList_First(kList list)
Gets a reference to the first list item.
kListItem kList_Next(kList list, kListItem item)
Given a list item, gets a reference to the next list item.