Iterator for as_arraylist.
To use the iterator, you can either initialize a stack allocated variable, using as_arraylist_iterator_init():
Or you can create a new heap allocated variable, using as_arraylist_iterator_new():
To iterate, use as_arraylist_iterator_has_next() and as_arraylist_iterator_next():
When you are finished using the iterator, then you should release the iterator and associated resources:
The as_arraylist_iterator is a subtype of as_iterator. This allows you to alternatively use as_iterator functions, by typecasting as_arraylist_iterator to as_iterator.
Each of the as_iterator functions proxy to the as_arraylist_iterator functions. So, calling as_iterator_destroy() is equivalent to calling as_arraylist_iterator_destroy().
Definition at line 90 of file as_arraylist_iterator.h.
#include "as_arraylist_iterator.h"
Destroy the iterator and releases resources used by the iterator.
- Parameters
-
| iterator | The iterator to release |
Tests if there are more values available in the iterator.
- Parameters
-
| iterator | The iterator to be tested. |
- Returns
- true if there are more values. Otherwise false.
Initializes a stack allocated as_iterator for as_arraylist.
- Parameters
-
| iterator | The iterator to initialize. |
| list | The list to iterate. |
- Returns
- On success, the initialized iterator. Otherwise NULL.
Creates a new heap allocated as_iterator for as_arraylist.
- Parameters
-
- Returns
- On success, the new iterator. Otherwise NULL.
Attempts to get the next value from the iterator. This will return the next value, and iterate past the value.
- Parameters
-
| iterator | The iterator to get the next value from. |
- Returns
- The next value in the list if available. Otherwise NULL.
| uint32_t as_arraylist_iterator::pos |
The documentation for this struct was generated from the following file: