carb::settings::walkSettings
Defined in carb/settings/SettingsUtils.h
- 
template<typename ElementData, typename OnItemFnType>
 inline void carb::settings::walkSettings(carb::dictionary::IDictionary *idict, carb::settings::ISettings *settings, dictionary::WalkerMode walkerMode, const char *rootPath, ElementData rootElementData, OnItemFnType onItemFn, void *userData)
- A function for walking all of the settings from a given root. - Similar to dictionary::walkDictionary(). - Template Parameters
- ElementData – Type of the second parameter passed to - onItemFn.
- OnItemFnType – Type of the invocable - onItemFn.
 
- Parameters
- idict – The acquired dictionary::IDictionary interface. 
- settings – The acquired ISettings interface. 
- walkerMode – See dictionary::WalkerMode. 
- rootPath – The settings root to begin the walk at. An empty string or “/” is considered the root of the settings tree. 
- rootElementData – A value of type - ElementDatathat is passed as the second parameter to- onItemFn. This value is not used by- walkSettings()and is intended to be used only by the caller and the- onItemFninvocable.
- onItemFn – An invocable that is invoked for each setting value encountered. The type of this invocable should be - ElementData(const char*, ElementData, void*): the encountered item path is the first parameter, followed by the parent’s- ElementData, followed by- userData. The return value is only used for dictionary and array settings: the returned- ElementDatawill be passed to- onItemFninvocations for child settings; the return value is otherwise ignored.
- userData – A caller-specific value that is not used but is passed to every - onItemFninvocation.