carb::dictionary::OnItemFn
Defined in carb/dictionary/DictionaryUtils.h
-
template<typename ElementData>
using carb::dictionary::OnItemFn = ElementData (*)(const Item *srcItem, ElementData elementData, void *userData) Prototype for a callback function used to walk items in a dictionary.
- Template Parameters
ElementData – An arbitrary data type used as both a parameter and the return value of the callback. The callback itself is assumed to know how to interpret and use this value.
- Param srcItem
[in] The current item being visited. This will never be
nullptr
.- Param elementData
[in] An arbitrary data object passed into the callback by the caller of walkDictionary(). The callback is assumed that it knows how to interpret and use this value.
- Param userData
[in] An opaque data object passed by the caller of walkDictionary(). The callback is assumed that it knows how to interpret and use this object.
- Return
An ElementData object or value to pass back to the dictionary walker. When the callback returns from passing in a new dictionary value (ie: a child of the original dictionary), this value is stored and passed on to following callbacks.