78 */ |
78 */ |
79 bool remove; |
79 bool remove; |
80 }; |
80 }; |
81 |
81 |
82 /** |
82 /** |
|
83 * Convenience type definition for the base structure of an iterator. |
|
84 * @see #CX_ITERATOR_BASE |
|
85 */ |
|
86 typedef struct cx_iterator_base_s CxIteratorBase; |
|
87 |
|
88 /** |
83 * Declares base attributes for an iterator. |
89 * Declares base attributes for an iterator. |
84 * Must be the first member of an iterator structure. |
90 * Must be the first member of an iterator structure. |
85 */ |
91 */ |
86 #define CX_ITERATOR_BASE struct cx_iterator_base_s base |
92 #define CX_ITERATOR_BASE struct cx_iterator_base_s base |
87 |
93 |
184 * Obtains a reference to an arbitrary iterator. |
190 * Obtains a reference to an arbitrary iterator. |
185 * |
191 * |
186 * This is useful for APIs that expect some iterator as an argument. |
192 * This is useful for APIs that expect some iterator as an argument. |
187 * |
193 * |
188 * @param iter the iterator |
194 * @param iter the iterator |
189 * @return (@c CxIterator*) a pointer to the iterator |
195 * @return (@c struct @c cx_iterator_base_s*) a pointer to the iterator |
190 */ |
196 */ |
191 #define cxIteratorRef(iter) &((iter).base) |
197 #define cxIteratorRef(iter) &((iter).base) |
192 |
198 |
193 /** |
199 /** |
194 * Loops over an iterator. |
200 * Loops over an iterator. |