|
Zen API
|
Supports forward iteration over a collection of items.
The kCollection interface supports forward iteration over a collection of elements. Typically, the classes that implement this interface provide alternative, class-specific accessor methods with better performance. However, the kCollection interface can be used to reduce the amount of container-specific code required to iterate over a variety of collections, in contexts where performance is not important.
Inheritance diagram for kCollection:Public Member Functions | |
| kSize | kCollection_Count (kCollection collection) |
| Gets the collection element count. More... | |
| kIterator | kCollection_GetIterator (kCollection collection) |
| Returns an iterator to the first element in the collection. More... | |
| kBool | kCollection_HasNext (kCollection collection, kIterator iterator) |
| Determines whether a collection has another item. More... | |
| kType | kCollection_ItemType (kCollection collection) |
| Gets the collection element type. More... | |
| void * | kCollection_Next (kCollection collection, kIterator *iterator) |
| Gets the next collection element and then advances the iterator. More... | |
| kSize kCollection_Count | ( | kCollection | collection | ) |
Gets the collection element count.
| collection | Collection object. |
| kIterator kCollection_GetIterator | ( | kCollection | collection | ) |
Returns an iterator to the first element in the collection.
| collection | Collection object. |
| kBool kCollection_HasNext | ( | kCollection | collection, |
| kIterator | iterator | ||
| ) |
Determines whether a collection has another item.
| collection | Collection object. |
| iterator | Collection iterator. |
| kType kCollection_ItemType | ( | kCollection | collection | ) |
Gets the collection element type.
| collection | Collection object. |
| void * kCollection_Next | ( | kCollection | collection, |
| kIterator * | iterator | ||
| ) |
Gets the next collection element and then advances the iterator.
| collection | Collection object. |
| iterator | Pointer to collection iterator. |