#include <XMLConfiguration.h>
Public Member Functions | |
virtual void | clear () |
CXMLConfiguration () | |
virtual std::string | errorStr () |
virtual bool | loadFile (const std::string &filename) |
void | print () |
virtual bool | reload () |
virtual CConfigSection | root () |
virtual bool | saveFile (const std::string &filename="") |
virtual | ~CXMLConfiguration () |
Protected Member Functions | |
bool | findXmlNode (TiXmlElement *rootElement, const std::string &nodePath, TiXmlElementList *resultList) |
void | processIncludes (TiXmlElement *rootNode, TiXmlElement *node, const std::string &filePath) |
Protected Attributes | |
std::string | mFilename |
IXMLConfigSection * | mPRootConfigSection |
TiXmlDocument | mXMLDocument |
Private Member Functions | |
CXMLConfiguration (CXMLConfiguration &other) | |
CXMLConfiguration & | operator= (const CXMLConfiguration &other) |
Definition at line 74 of file XMLConfiguration.h.
Definition at line 422 of file XMLConfiguration.cpp.
CXMLConfiguration::~CXMLConfiguration | ( | ) | [virtual] |
Definition at line 428 of file XMLConfiguration.cpp.
CXMLConfiguration::CXMLConfiguration | ( | CXMLConfiguration & | other | ) | [inline, private] |
Definition at line 107 of file XMLConfiguration.h.
void CXMLConfiguration::clear | ( | ) | [virtual] |
Clears the configuration.
Implements CConfiguration.
Definition at line 649 of file XMLConfiguration.cpp.
std::string CXMLConfiguration::errorStr | ( | ) | [virtual] |
Returns the error string if something went wrong (read: if a function returned false)
Implements CConfiguration.
Definition at line 641 of file XMLConfiguration.cpp.
bool CXMLConfiguration::findXmlNode | ( | TiXmlElement * | rootElement, |
const std::string & | nodePath, | ||
TiXmlElementList * | resultList | ||
) | [protected] |
Definition at line 435 of file XMLConfiguration.cpp.
bool CXMLConfiguration::loadFile | ( | const std::string & | filename | ) | [virtual] |
Sets the file to use, calls load().
filename | The configuration file to read. |
Implements CConfiguration.
Definition at line 485 of file XMLConfiguration.cpp.
CXMLConfiguration& CXMLConfiguration::operator= | ( | const CXMLConfiguration & | other | ) | [inline, private] |
Definition at line 108 of file XMLConfiguration.h.
void CXMLConfiguration::print | ( | ) |
Definition at line 660 of file XMLConfiguration.cpp.
void CXMLConfiguration::processIncludes | ( | TiXmlElement * | rootNode, |
TiXmlElement * | node, | ||
const std::string & | filePath | ||
) | [protected] |
Definition at line 515 of file XMLConfiguration.cpp.
bool CXMLConfiguration::reload | ( | ) | [virtual] |
Reloads the configuration from file.
Implements CConfiguration.
Definition at line 633 of file XMLConfiguration.cpp.
CConfigSection CXMLConfiguration::root | ( | ) | [virtual] |
Returns the root node with the actual configuration
Implements CConfiguration.
Definition at line 655 of file XMLConfiguration.cpp.
bool CXMLConfiguration::saveFile | ( | const std::string & | filename = "" | ) | [virtual] |
Saves the configuration.
filename | The filename to write the configuration to. If omitted, the filename from loadFile is used. Otherwise FALSE is returned |
Implements CConfiguration.
Definition at line 617 of file XMLConfiguration.cpp.
std::string CXMLConfiguration::mFilename [protected] |
The filename
Definition at line 82 of file XMLConfiguration.h.
IXMLConfigSection* CXMLConfiguration::mPRootConfigSection [protected] |
Definition at line 79 of file XMLConfiguration.h.
TiXmlDocument CXMLConfiguration::mXMLDocument [protected] |
The XML document
Definition at line 78 of file XMLConfiguration.h.