Properties class, which helps out with storeing or loading key value pairs from/to property files.
More...
#include <minitscript/utilities/Properties.h>
|
| Properties () |
| Public constructor. More...
|
|
void | clear () |
| Clear. More...
|
|
const string & | get (const string &key, const string &defaultValue) const |
| Get property value by key. More...
|
|
void | put (const string &key, const string &value) |
| Add property. More...
|
|
void | load (const string &pathName, const string &fileName) |
| Load property file. More...
|
|
void | store (const string &pathName, const string &fileName) const |
| Store property file. More...
|
|
const unordered_map< string, string > & | getProperties () |
|
Properties class, which helps out with storeing or loading key value pairs from/to property files.
- Author
- Andreas Drewke
Definition at line 16 of file Properties.h.
◆ Properties()
◆ clear()
◆ get()
const string& get |
( |
const string & |
key, |
|
|
const string & |
defaultValue |
|
) |
| const |
|
inline |
Get property value by key.
- Parameters
-
key | key |
defaultValue | default value |
- Returns
- value if found or default value
Definition at line 40 of file Properties.h.
◆ put()
void put |
( |
const string & |
key, |
|
|
const string & |
value |
|
) |
| |
|
inline |
◆ load()
void load |
( |
const string & |
pathName, |
|
|
const string & |
fileName |
|
) |
| |
Load property file.
- Parameters
-
pathName | path name |
fileName | file name |
- Exceptions
-
tdme::os::filesystem::FileSystemException | |
Definition at line 22 of file Properties.cpp.
◆ store()
void store |
( |
const string & |
pathName, |
|
|
const string & |
fileName |
|
) |
| const |
Store property file.
- Parameters
-
pathName | path name |
fileName | file name |
- Exceptions
-
tdme::os::filesystem::FileSystemException | |
Definition at line 38 of file Properties.cpp.
◆ getProperties()
const unordered_map<string, string>& getProperties |
( |
| ) |
|
|
inline |
◆ properties
unordered_map<string, string> properties |
|
private |
The documentation for this class was generated from the following files:
- /home/andreas/Development/drewke.net/minitscript/src/minitscript/utilities/Properties.h
- /home/andreas/Development/drewke.net/minitscript/src/minitscript/utilities/Properties.cpp