34 #ifndef _ConfigFile_H__    35 #define _ConfigFile_H__    58             virtual void save() 
const;
    59             virtual void saveAs(
const std::string& filename) 
const;
    64                 { 
return this->filename_; }
    76                 this->getOrCreateSection(section)->setValue(name, value, bString);
   101                 const std::string& output = this->getOrCreateSection(section)->getOrCreateValue(name, fallback, bString);
   102                 this->saveIfUpdated();
   117                 this->getOrCreateSection(section)->setValue(name, index, value, bString);
   144                 const std::string& output = this->getOrCreateSection(section)->getOrCreateValue(name, index, fallback, bString);
   145                 this->saveIfUpdated();
   149             void deleteVectorEntries(
const std::string& section, 
const std::string& name, 
unsigned int startindex = 0);
   170             void saveIfUpdated();
 std::string BLANKSTRING
A blank string (""). Used to return a blank string by reference. 
Definition: StringUtils.cc:46
 
bool bUpdated_
Becomes true if a section is added. 
Definition: ConfigFile.h:174
 
unsigned int getVectorSize(const std::string §ion, const std::string &name) const 
Returns the size of a config vector. 
Definition: ConfigFile.h:155
 
unsigned int getVectorSize(const std::string &name) const 
Returns the size of a config vector. 
Definition: ConfigFileSection.cc:79
 
const std::string & getValue(const std::string §ion, const std::string &name, unsigned int index, bool bString)
Returns the value of a given element of a vector in the config file. 
Definition: ConfigFile.h:128
 
static const char * DEFAULT_CONFIG_FOLDER
The folder where the default config files will be stored. 
Definition: ConfigFile.h:161
 
const std::string & getValue(const std::string &name, bool bString)
Returns the value of a given entry in the section. 
Definition: ConfigFileSection.h:96
 
Shared library macros, enums, constants and forward declarations for the core library  ...
 
::std::string string
Definition: gtest-port.h:756
 
const bool bCopyFallbackFile_
If true, the default config file is copied into the config-directory before loading the file...
Definition: ConfigFile.h:173
 
This class represents a config file, which is stored on the hard-disk and contains config values in d...
Definition: ConfigFile.h:51
 
void setValue(const std::string §ion, const std::string &name, unsigned int index, const std::string &value, bool bString)
Stores the value of an element of a vector in the config file. 
Definition: ConfigFile.h:115
 
Die Wagnis Klasse hat die folgenden Aufgaben: 
Definition: ApplicationPaths.cc:66
 
const std::string & getOrCreateValue(const std::string §ion, const std::string &name, unsigned int index, const std::string &fallback, bool bString)
Returns the value of a given element of a vector in the config file. 
Definition: ConfigFile.h:142
 
#define _CoreExport
Definition: CorePrereqs.h:61
 
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION() fallback()
Fallback implementation, returns an empty list. 
Definition: ArgumentCompletionFunctions.cc:67
 
const std::string & getOrCreateValue(const std::string §ion, const std::string &name, const std::string &fallback, bool bString)
Returns the value of a given entry in the config file. 
Definition: ConfigFile.h:99
 
Represents a section in a config file. 
Definition: ConfigFileSection.h:54
 
void setValue(const std::string §ion, const std::string &name, const std::string &value, bool bString)
Stores a value in the config file. 
Definition: ConfigFile.h:74
 
const std::string filename_
The filename of this config file. 
Definition: ConfigFile.h:172
 
std::list< ConfigFileSection * > sections_
A list of sections in this config file. 
Definition: ConfigFile.h:167
 
const std::string & getValue(const std::string §ion, const std::string &name, bool bString)
Returns the value of a given entry in the config file. 
Definition: ConfigFile.h:86
 
const std::string & getFilename()
Returns the file-name of this config file. 
Definition: ConfigFile.h:63