| 202 size_t index; |
202 size_t index; |
| 203 }; |
203 }; |
| 204 |
204 |
| 205 /** |
205 /** |
| 206 * Iterator value type. |
206 * Iterator value type. |
| 207 * An iterator points to a certain element in an (possibly unbounded) chain of elements. |
207 * An iterator points to a certain element in a (possibly unbounded) chain of elements. |
| 208 * Iterators that are based on collections (which have a defined "first" element), are supposed |
208 * Iterators that are based on collections (which have a defined "first" element), are supposed |
| 209 * to be "position-aware", which means that they keep track of the current index within the collection. |
209 * to be "position-aware", which means that they keep track of the current index within the collection. |
| 210 * |
210 * |
| 211 * @note Objects that are pointed to by an iterator are always mutable through that iterator. However, |
211 * @note Objects that are pointed to by an iterator are always mutable through that iterator. However, |
| 212 * this iterator cannot mutate the collection itself (add or remove elements) and any mutation of the |
212 * this iterator cannot mutate the collection itself (add or remove elements) and any mutation of the |
| 213 * collection by other means make this iterator invalid (regardless of what cxIteratorValid() returns). |
213 * collection by other means makes this iterator invalid (regardless of what cxIteratorValid() returns). |
| 214 * |
214 * |
| 215 * @see CxMutIterator |
215 * @see CxMutIterator |
| 216 */ |
216 */ |
| 217 typedef struct cx_iterator_s CxIterator; |
217 typedef struct cx_iterator_s CxIterator; |
| 218 |
218 |