src/cx/iterator.h

changeset 1681
56e76fbac167
parent 1675
36c0fb2b60b2
equal deleted inserted replaced
1680:1aa21afb8763 1681:56e76fbac167
177 * @return @c true if removal is allowed, @c false otherwise 177 * @return @c true if removal is allowed, @c false otherwise
178 */ 178 */
179 #define cxIteratorFlagRemoval(iter) ((iter).base.remove = (iter).base.allow_remove) 179 #define cxIteratorFlagRemoval(iter) ((iter).base.remove = (iter).base.allow_remove)
180 180
181 /** 181 /**
182 * Obtains a reference to an arbitrary iterator.
183 *
184 * This is useful for APIs that expect some iterator as an argument.
185 *
186 * @param iter the iterator
187 * @return (@c struct @c cx_iterator_base_s*) a pointer to the iterator
188 */
189 #define cxIteratorRef(iter) &((iter).base)
190
191 /**
192 * Loops over an iterator. 182 * Loops over an iterator.
193 * 183 *
194 * @param type the type of the elements 184 * @param type the type of the elements
195 * @param elem the name of the iteration variable 185 * @param elem the name of the iteration variable
196 * @param iter the iterator 186 * @param iter the iterator

mercurial