src/cx/iterator.h

changeset 1675
36c0fb2b60b2
parent 1607
0ecb13118cac
equal deleted inserted replaced
1674:8b0f162ac88e 1675:36c0fb2b60b2
36 #ifndef UCX_ITERATOR_H 36 #ifndef UCX_ITERATOR_H
37 #define UCX_ITERATOR_H 37 #define UCX_ITERATOR_H
38 38
39 #include "common.h" 39 #include "common.h"
40 40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 /** 41 /**
46 * Common data for all iterators. 42 * Common data for all iterators.
47 */ 43 */
48 struct cx_iterator_base_s { 44 struct cx_iterator_base_s {
49 /** 45 /**
218 * @param elem_size the size of one array element 214 * @param elem_size the size of one array element
219 * @param elem_count the number of elements in the array 215 * @param elem_count the number of elements in the array
220 * @return an iterator for the specified array 216 * @return an iterator for the specified array
221 * @see cxIteratorPtr() 217 * @see cxIteratorPtr()
222 */ 218 */
223 cx_attr_nodiscard 219 CX_EXTERN CX_NODISCARD
224 CX_EXPORT CxIterator cxIterator(const void *array, 220 CxIterator cxIterator(const void *array,
225 size_t elem_size, size_t elem_count); 221 size_t elem_size, size_t elem_count);
226 222
227 /** 223 /**
228 * Creates an iterator for the specified plain pointer array. 224 * Creates an iterator for the specified plain pointer array.
229 * 225 *
235 * @param array a pointer to the array (can be @c NULL) 231 * @param array a pointer to the array (can be @c NULL)
236 * @param elem_count the number of elements in the array 232 * @param elem_count the number of elements in the array
237 * @return an iterator for the specified array 233 * @return an iterator for the specified array
238 * @see cxIterator() 234 * @see cxIterator()
239 */ 235 */
240 cx_attr_nodiscard 236 CX_EXTERN CX_NODISCARD
241 CX_EXPORT CxIterator cxIteratorPtr(const void *array, size_t elem_count); 237 CxIterator cxIteratorPtr(const void *array, size_t elem_count);
242
243 #ifdef __cplusplus
244 } // extern "C"
245 #endif
246 238
247 #endif // UCX_ITERATOR_H 239 #endif // UCX_ITERATOR_H

mercurial