presenting ConfigMap which is a StringMap Tree very much similar to KeyValues.
Difference is that it only works with strings as values and stringmaps as sections.
ConfigMap(const char filename);
bool GetVal(const char key, PackVal valbuf);
int GetSize(const char key_path);
bool Get(const char key_path, char buffer, int buf_size);
ConfigMap GetSection(const char key_path);
KeyValType GetKeyValType(const char key_path);
Accessing values and sections is easy:
assume this config:
to access the value "howdy", use the key path string: "root.value1"
to access the value "hi", use the key path string: "root.section1.value1"
to access the value "bonjour", use the key path string: "root.section2.subsection1.value1"
to reduce having to use these key path strings all the time on frequently used subsections, use `GetSection` to save the ConfigMap of a subsection, there is no need to free the instance to the subsection.
When you're done with the entire config map, use `Destroy` to clean it all up.