Modules | |
Additional iterator flags | |
Defines | |
#define | COL_TRAVERSE_DEFAULT 0x00000000 |
Traverse all items in the collection. | |
#define | COL_TRAVERSE_ONELEVEL 0x00000001 |
Traverse only the top level. | |
#define | COL_TRAVERSE_END 0x00000002 |
Insert end collection marker. | |
#define | COL_TRAVERSE_IGNORE 0x00000004 |
Ignore sub collections as if none is present. | |
#define | COL_TRAVERSE_FLAT 0x00000008 |
Flatten the collection. |
The following constants define how a collection can be traversed or iterated.
Flags defined below can generally be combined with each other.
COL_TRAVERSE_FLAT, COL_TRAVERSE_SHOWSUB, COL_TRAVERSE_ONLYSUB are mutually exclusive flags. If combined together results will be unpredictable.
DO NOT MIX THEM IN ONE ITERATOR.
#define COL_TRAVERSE_END 0x00000002 |
Insert end collection marker.
Call the handler once more when the end of the collection is reached. Specifying this flag would cause a traversing function to call a callback once more passing in a virtual property of type COL_TYPE_END. Good for processing nested collections.
#define COL_TRAVERSE_FLAT 0x00000008 |
Flatten the collection.
Traversing this way would act as if all the properties of sub collection are properties of the root collection. The referencing properties or headers of the referenced collections are skipped.
If we think of the book case example this is very useful when one wants to iterate through all the books skipping information about which shelf they are on.
#define COL_TRAVERSE_ONELEVEL 0x00000001 |
Traverse only the top level.
Traverse only top level ignored if the IGNORE flag is specified