|
Public Member Functions |
| | ZConfigFile () |
| | Default constructor.
|
| | ZConfigFile (std::string filename) |
| | Constructor which takes filename.
|
| virtual | ~ZConfigFile () |
| | Destructor, flushes file.
|
| void | Process (std::string filename) |
| | Parse a file.
|
| float | GetFloat (std::string section, std::string var, float defVal) const |
| | Get value in floating point format from file.
|
| int | GetInt (std::string section, std::string var, int defVal) const |
| | Get value in integer format from file.
|
| bool | GetBool (std::string section, std::string var, bool defVal) const |
| | Get value in boolean format from file.
|
| std::string | GetString (std::string section, std::string var, std::string defVal) const |
| | Get value in std::string format from file.
|
| void | SetFloat (std::string section, std::string var, float val) |
| | Set value in floating point format in file.
|
| void | SetInt (std::string section, std::string var, int val) |
| | Set value in integer format in file.
|
| void | SetBool (std::string section, std::string var, bool val) |
| | Set value in boolean format in file.
|
| void | SetString (std::string section, std::string var, std::string val) |
| | Set value in std::string format in file.
|
| void | Flush () |
| | Write all values to file.
|
| void | Close () |
| | Close the file.
|
Protected Member Functions |
| std::string | CleanString (std::string str) const |
| | Reformat a std::string in a form more suitable to parsing.
|
| bool | Exists (std::string sec) const |
| | Check if a section exists.
|
| bool | Exists (std::string sec, std::string var) const |
| | Check if a variable exists.
|
| void | SetVariable (std::string sec, std::string var, std::string val) |
| | Internal function to set variables.
|
| std::string | GetVariable (std::string sec, std::string var, std::string defVal) const |
| | Internal function to get value of a variable.
|
Protected Attributes |
|
std::list< ZCF_Section > | rFileLayout |
| | List of sections of internal type.
|
|
std::string | rFilename |
| | Filename of file currently open.
|