254 #define kQueue_AddCount_(QUEUE, C) kxQueue_AddCount_(QUEUE, C)
255 #define kQueue_RemoveCount_(QUEUE, C) kxQueue_RemoveCount_(QUEUE, C)
256 #define kQueue_Clear_(QUEUE) kxQueue_Clear_(QUEUE)
257 #define kQueue_ItemType_(QUEUE) kxQueue_ItemType_(QUEUE)
258 #define kQueue_ItemSize_(QUEUE) kxQueue_ItemSize_(QUEUE)
259 #define kQueue_Count_(QUEUE) kxQueue_Count_(QUEUE)
260 #define kQueue_Capacity_(QUEUE) kxQueue_Capacity_(QUEUE)
261 #define kQueue_At_(QUEUE, INDEX) kxQueue_At_(QUEUE, INDEX)
264 #define kQueue_As_(QUEUE, INDEX, TYPE) kxQueue_As_(QUEUE, INDEX, TYPE)
268 #include <kApi/Data/kQueue.x.h>
kSize kQueue_ItemSize(kQueue queue)
Returns the queue element size.
kType kQueue_ItemType(kQueue queue)
Returns the queue element type.
kStatus kQueue_Construct(kQueue *queue, kType itemType, kSize initialCapacity, kAlloc allocator)
Constructs a kQueue object.
kStatus kQueue_SetItem(kQueue queue, kSize index, const void *item)
Sets the value of an item.
kStatus kQueue_Remove(kQueue queue, void *item)
Removes the item at the head of the queue.
kStatus kQueue_Allocate(kQueue queue, kType itemType, kSize initialCapacity)
Reallocates the queue item buffer.
Represents an unsigned integer that can store a pointer address.
Abstract base class for memory allocator types.
kStatus kQueue_Reserve(kQueue queue, kSize capacity)
Ensures that capacity is reserved for at least the specified number of queue items.
kStatus kQueue_Item(kQueue queue, kSize index, void *item)
Gets the value of an item.
kStatus kQueue_Assign(kQueue queue, kQueue source)
Performs a shallow copy of the source queue.
kSize kQueue_Count(kQueue queue)
Returns the current count of items in the queue.
kStatus kQueue_Clear(kQueue queue)
Sets the count of queue items to zero.
kStatus kQueue_Purge(kQueue queue)
Disposes any elements in the queue and sets the count of queue items to zero.
kStatus kQueue_Add(kQueue queue, const void *item)
Adds the specified item to the end of the queue.
Essential API declarations.
Represents a synchronized FIFO queue with an optional maximum size or count capacity.
void * kQueue_At(kQueue queue, kSize index)
Returns a pointer to the specified item in the queue buffer.
Represents metadata about a type (class, interface, or value).
Represents a FIFO queue implemented with a dynamic array.
Represents an enumeration of error codes.
kStatus kQueue_RemoveCount(kQueue queue, kSize count)
Decreases the queue count by the specified amount.
kSize kQueue_Capacity(kQueue queue)
Returns the number of elements for which space has been allocated.
kStatus kQueue_AddCount(kQueue queue, kSize count)
Increases the queue count by the specified amount.