carb::dictionary::getValueOrDefault
Defined in omni/extras/DictHelpers.h
- 
template<typename T>
 T carb::dictionary::getValueOrDefault(const Item *baseItem, const char *path, T defaultValue)
- Gets a child value from a given Item if present, otherwise returns the given default value. - Template Parameters
- T – the type of the return value and default value 
- Parameters
- baseItem – The carb::dictionary::Item to use as a base (required) 
- path – The path of children from - baseItemusing- /as a separator
- defaultValue – The default value to return if no item is present at the given location 
 
- Returns
- The carb::dictionary::Item converted to - Twith carb::dictionary::IDictionary::get(), or- defaultValueif the given- baseItemand- pathdid not resolve to an Item