BIE |
ConfigFileReader Class ReferenceThis class is a wrapper to the Common C++ class used for INI file processing and provides a few additional conveniences for config file management. More...
Detailed DescriptionThis class is a wrapper to the Common C++ class used for INI file processing and provides a few additional conveniences for config file management.The class provides methods that give typed access to the variables. Also, undefined variables are handled a bit more gracefully than in the provided interface. If a variable is not found, a suitably typed default return value can be provided rather than NULL. The class will also take care of creating a .bierc file for a user that doesn't have one already. Typical usage: ConfigFileReader * kd = new ConfigFileReader("cli"); bool mybool = kd->getValue("mybool", true); string mystring = kd->getValue("mystring", "Alistair"); Constructor & Destructor Documentation
Constructs an object for reading values of variables from INI files. The section of the INI file must be specified (e.g. "cli" is a section in the .bierc config file). Will also create a ~/.bierc file for users who are missing this file.
Member Function Documentation
Get the last set value for a configuration variable as a string. The value will probably come from a config file. When the variable does not exist, the default value is returned.
Get the last set value for a configuration variable as a boolean. The value will probably come from a config file. When the variable does not exist, the default value is returned.
Get the last set value for a configuration variable as an int. The value will probably come from a config file. When the variable does not exist, the default value is returned.
Get the last set value for a configuration variable as a double. The value will probably come from a config file. When the variable does not exist, the default value is returned.
The documentation for this class was generated from the following file:
Send suggestions, questions, and feedback to WEINBERG at ASTRO dot UMASS dot EDU. Documentation generated at Fri Mar 26 00:35:11 2010 by
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||