4 #include <unordered_map>
13 using std::unordered_map;
46 inline const string&
get(
const string& key,
const string& defaultValue)
const {
48 if (it ==
properties.end())
return defaultValue;
58 inline void put(
const string& key,
const string& value) {
Properties class, which helps out with storeing or loading key value pairs from/to property files.
void put(const string &key, const string &value)
Add property.
const string & get(const string &key, const string &defaultValue) const
Get property value by key.
const unordered_map< string, string > & getProperties()
unordered_map< string, string > properties
Properties()
Public constructor.
void load(const string &pathName, const string &fileName, FileSystemInterface *fileSystem=nullptr)
Load property file.
void store(const string &pathName, const string &fileName, FileSystemInterface *fileSystem=nullptr) const
Store property file.