10 #ifndef K_API_COLLECTION_H
11 #define K_API_COLLECTION_H
14 #include <kApi/Data/kCollection.x.h>
63 return xkCollection_VTable(collection)->VItemType(collection);
75 return xkCollection_VTable(collection)->VCount(collection);
87 return xkCollection_VTable(collection)->VGetIterator(collection);
100 return xkCollection_VTable(collection)->VHasNext(collection, iterator);
113 return xkCollection_VTable(collection)->VNext(collection, iterator);
128 #define kCollection_NextT(kCollection_collection, kIteratorPtr_iterator, T) \
129 kCast(T*, xkCollection_NextT(kCollection_collection, kIteratorPtr_iterator, sizeof(T)))
kType kCollection_ItemType(kCollection collection)
Gets the collection element type.
Definition: kCollection.h:61
Supports forward iteration over a collection of items.
Represents an unsigned integer that can store a pointer address.
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:26
Used in conjunction with the kCollection class to iterate over elements.
kBool kCollection_HasNext(kCollection collection, kIterator iterator)
Determines whether a collection has another item.
Definition: kCollection.h:98
Core Zen type declarations.
void * kCollection_Next(kCollection collection, kIterator *iterator)
Gets a pointer to the next collection element and then advances the iterator.
Definition: kCollection.h:111
Represents metadata about a type (class, interface, or value).
Represents a boolean value.
kSize kCollection_Count(kCollection collection)
Gets the collection element count.
Definition: kCollection.h:73
kIterator kCollection_GetIterator(kCollection collection)
Returns an iterator to the first element in the collection.
Definition: kCollection.h:85