All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Valuable::ConfigDocument Class Reference

Text document used to configure various settings with key-value pairs. More...

#include <Valuable/ConfigDocument.hpp>

Public Member Functions

 ConfigDocument (void)
 Creates an empty ConfigDocument object.
 
ConfigElementgetConfigElement (const QString &key)
 Gets the configuration element with the given name. More...
 
ConfigElementgetConfigElement (const QString &key, const QString &value)
 Gets the configuration element with the given name.
 
bool readConfigFile (const char *fileName)
 Reads a configuration from a file.
 
ConfigElementroot ()
 Returns the root configuration element.
 
void writeConfig (std::ostream &)
 Writes the configuration to a stream.
 
void writeConfigFile (const char *fileName)
 Writes the configuration to a file.
 

Static Public Member Functions

static QString getConfigText (ConfigElement e, int recursion=0)
 Returns the configuration as string.
 

Detailed Description

Text document used to configure various settings with key-value pairs.

Member Function Documentation

ConfigElement* Valuable::ConfigDocument::getConfigElement ( const QString &  key)

Gets the configuration element with the given name.

Parameters
keyname of the element
Returns
pointer to the element or 0 if element is not found