The unified map structure to store configurations in a key-value style. More...
#include <Utils/ConfigMap.hpp>

Public Member Functions | |
| void | edit (std::string key, uint64_t value) |
| Edit the config map. If not exit the config, will create new, or will overwrite. More... | |
| void | edit (std::string key, int64_t value) |
| Edit the config map. If not exit the config, will create new, or will overwrite. More... | |
| void | edit (std::string key, double value) |
| Edit the config map. If not exit the config, will create new, or will overwrite. More... | |
| void | edit (std::string key, std::string value) |
| Edit the config map. If not exit the config, will create new, or will overwrite. More... | |
| bool | existU64 (std::string key) |
| To detect whether the key exists and related to a U64. More... | |
| bool | existI64 (std::string key) |
| To detect whether the key exists and related to a I64. More... | |
| bool | existDouble (std::string key) |
| To detect whether the key exists and related to a double. More... | |
| bool | existString (std::string key) |
| To detect whether the key exists and related to a std::string. More... | |
| bool | exist (std::string key) |
| To detect whether the key exists. More... | |
| uint64_t | getU64 (std::string key) |
| To get a U64 value by key. More... | |
| int64_t | getI64 (std::string key) |
| To get a I64 value by key. More... | |
| double | getDouble (std::string key) |
| To get a double value by key. More... | |
| std::string | getString (std::string key) |
| To get a std::string value by key. More... | |
| std::string | toString (std::string separator="\t", std::string newLine="\n") |
| convert the whole map to std::string and retuen More... | |
| void | cloneInto (ConfigMap &dest) |
| clone this config into destination More... | |
| bool | toFile (std::string fname, std::string separator=",", std::string newLine="\n") |
| convert the whole map to file More... | |
| bool | fromFile (std::string fname, std::string separator=",", std::string newLine="\n") |
| update the whole map from file More... | |
| int64_t | tryI64 (string key, int64_t defaultValue=0, bool showWarning=false) |
| Try to get an I64 from config map, if not exist, use default value instead. More... | |
| uint64_t | tryU64 (string key, uint64_t defaultValue=0, bool showWarning=false) |
| Try to get an U64 from config map, if not exist, use default value instead. More... | |
| double | tryDouble (string key, double defaultValue=0, bool showWarning=false) |
| Try to get a double from config map, if not exist, use default value instead. More... | |
| string | tryString (string key, string defaultValue="", bool showWarning=false) |
| Try to get an String from config map, if not exist, use default value instead. More... | |
Protected Member Functions | |
| void | spilt (const std::string s, const std::string &c, vector< std::string > &v) |
Protected Attributes | |
| std::map< std::string, uint64_t > | u64Map |
| std::map< std::string, int64_t > | i64Map |
| std::map< std::string, double > | doubleMap |
| std::map< std::string, std::string > | strMap |
The unified map structure to store configurations in a key-value style.