#include <ZE_ZConfigFile.h>
| Public Methods | |
| ZConfigFile () | |
| Default constructor. | |
| ZConfigFile (string filename) | |
| Constructor which takes filename. | |
| virtual | ~ZConfigFile () | 
| Destructor, flushes file. | |
| void | Process (string filename) | 
| Parse a file. | |
| float | GetFloat (string section, string var, float defVal) const | 
| Get value in floating point format from file. | |
| int | GetInt (string section, string var, int defVal) const | 
| Get value in integer format from file. | |
| bool | GetBool (string section, string var, bool defVal) const | 
| Get value in boolean format from file. | |
| string | GetString (string section, string var, string defVal) const | 
| Get value in string format from file. | |
| void | SetFloat (string section, string var, float val) | 
| Set value in floating point format in file. | |
| void | SetInt (string section, string var, int val) | 
| Set value in integer format in file. | |
| void | SetBool (string section, string var, bool val) | 
| Set value in boolean format in file. | |
| void | SetString (string section, string var, string val) | 
| Set value in string format in file. | |
| void | Flush () | 
| Write all values to file. | |
| void | Close () | 
| Close the file. | |
| Protected Methods | |
| string | CleanString (string str) const | 
| Reformat a string in a form more suitable to parsing. | |
| bool | Exists (string sec) const | 
| Check if a section exists. | |
| bool | Exists (string sec, string var) const | 
| Check if a variable exists. | |
| void | SetVariable (string sec, string var, string val) | 
| Internal function to set variables. | |
| string | GetVariable (string sec, string var, string defVal) const | 
| Internal function to get value of a variable. | |
| Protected Attributes | |
| list< ZCF_Section > | rFileLayout | 
| List of sections of internal type. | |
| string | rFilename | 
| Filename of file currently open. | |
| 
 | 
| A no-op default constructor. | 
| 
 | 
| Constructor takes filename, and calls process on it. 
 | 
| 
 | 
| Flushes the file, ensures a flush if the file is left open. | 
| 
 | 
| Removes whitespace from a string and makes all characters lowercase. 
 
 | 
| 
 | 
| Find out if a section currently exists. 
 
 | 
| 
 | ||||||||||||
| Find out if a variable currently exists. 
 
 | 
| 
 | ||||||||||||||||
| Set variable to value, called internally only. 
 | 
| 
 | ||||||||||||||||
| Get value of variable, called internally only. 
 
 | 
| 
 | 
| Parses the file, reading the contents into the fileLayout map. 
 | 
| 
 | ||||||||||||||||
| Get the current value of a variable in the file, or defVal if not found in file. 
 
 
 | 
| 
 | ||||||||||||||||
| Get the current value of a variable in the file, or defVal if not found in file. 
 
 | 
| 
 | ||||||||||||||||
| Get the current value of a variable in the file, or defVal if not found in file. (Valid values are "0","1","true" and "false") 
 
 | 
| 
 | ||||||||||||||||
| Get the current value of a variable in the file, or defVal if not found in file. 
 
 | 
| 
 | ||||||||||||||||
| Set the new value of a variable in the file to val, creating the section and variable if not already found in file. 
 
 | 
| 
 | ||||||||||||||||
| Set the new value of a variable in the file to val, creating the section and variable if not already found in file. 
 | 
| 
 | ||||||||||||||||
| Set the new value of a variable in the file to val, creating the section and variable if not already found in file. 
 | 
| 
 | ||||||||||||||||
| Set the new value of a variable in the file to val, creating the section and variable if not already found in file. 
 | 
| 
 | 
| Writes all values and sections to file. | 
| 
 | 
| Flush the file and clear the filename. | 
 1.3-rc2
1.3-rc2