#include <Configuration.h>
Public Member Functions | |
CConfiguration () | |
virtual void | clear ()=0 |
virtual std::string | errorStr ()=0 |
virtual bool | loadFile (const std::string &filename)=0 |
virtual bool | reload ()=0 |
int | resolveExpressions () |
virtual CConfigSection | root ()=0 |
virtual bool | saveFile (const std::string &filename="")=0 |
virtual | ~CConfiguration () |
Protected Member Functions | |
bool | isRegisteredString (const std::string &str) |
std::string | replaceConstants (const std::string &expr, mu::Parser *parser) |
std::string | replaceStringConstants (const std::string &expr) |
int | resolveExpressionsInSection (const CConfigSection §ion, mu::Parser *parser) |
bool | shouldParseNode (const std::string &nodeName) |
Protected Attributes | |
CLog2 | mLog |
std::vector< std::string > | mNodesExcludedFromParsing |
std::vector< std::string > | mRegisteredStrings |
std::map< std::string, std::string > | mStringConstants |
Definition at line 325 of file Configuration.h.
CConfiguration::CConfiguration | ( | ) | [inline] |
Empty constructor.
Definition at line 361 of file Configuration.h.
virtual CConfiguration::~CConfiguration | ( | ) | [inline, virtual] |
Destructor.
Definition at line 366 of file Configuration.h.
virtual void CConfiguration::clear | ( | ) | [pure virtual] |
Clears the configuration.
Implemented in CXMLConfiguration.
virtual std::string CConfiguration::errorStr | ( | ) | [pure virtual] |
Returns the error string if something went wrong (read: if a function returned false)
Implemented in CXMLConfiguration.
bool CConfiguration::isRegisteredString | ( | const std::string & | str | ) | [protected] |
virtual bool CConfiguration::loadFile | ( | const std::string & | filename | ) | [pure virtual] |
Sets the file to use, calls load().
filename | The configuration file to read. |
Implemented in CXMLConfiguration.
virtual bool CConfiguration::reload | ( | ) | [pure virtual] |
Reloads the configuration from file.
Implemented in CXMLConfiguration.
std::string CConfiguration::replaceConstants | ( | const std::string & | expr, |
mu::Parser * | parser | ||
) | [protected] |
std::string CConfiguration::replaceStringConstants | ( | const std::string & | expr | ) | [protected] |
Processes expressions into a single number if possible
int CConfiguration::resolveExpressionsInSection | ( | const CConfigSection & | section, |
mu::Parser * | parser | ||
) | [protected] |
virtual CConfigSection CConfiguration::root | ( | ) | [pure virtual] |
Returns the root node with the actual configuration
Implemented in CXMLConfiguration.
virtual bool CConfiguration::saveFile | ( | const std::string & | filename = "" | ) | [pure virtual] |
Saves the configuration.
filename | The filename to write the configuration to. If omitted, the filename from loadFile is used. Otherwise FALSE is returned |
Implemented in CXMLConfiguration.
bool CConfiguration::shouldParseNode | ( | const std::string & | nodeName | ) | [protected] |
CLog2 CConfiguration::mLog [protected] |
Definition at line 328 of file Configuration.h.
std::vector<std::string> CConfiguration::mNodesExcludedFromParsing [protected] |
Definition at line 343 of file Configuration.h.
std::vector<std::string> CConfiguration::mRegisteredStrings [protected] |
Definition at line 342 of file Configuration.h.
std::map<std::string, std::string> CConfiguration::mStringConstants [protected] |
Definition at line 350 of file Configuration.h.