|
CX Framework
Cross-platform C utility framework
|
Universal iteration macro for containers and iterable objects. More...
#include <cx/utils/macros.h>Go to the source code of this file.
Macros | |
| #define | foreach(type, itervar, ...) foreach_##type(type, itervar, __VA_ARGS__) |
Universal iteration macro for containers and iterable objects.
Definition in file foreach.h.
| #define foreach | ( | type, | |
| itervar, | |||
| ... | |||
| ) | foreach_##type(type, itervar, __VA_ARGS__) |
Universal iteration macro for containers and iterable objects
The foreach macro provides a consistent interface for iterating over various container types. The specific parameters required after itervar depend on the container type being iterated. See the detailed documentation above for type-specific usage patterns.
| type | Container type (sarray, hashtable, string, vfssearch, ssd, object) |
| itervar | Name for the iterator variable |
| ... | Type-specific initialization parameters (varies by container type) |
Example: