COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Classes | Static Public Member Functions | Private Member Functions | List of all members
covise::coCoviseConfig Class Reference

#include <CoviseConfig.h>

Classes

class  RefPtr
 
class  ScopeEntries
 

Static Public Member Functions

static std::string getEntry (const std::string &entry, bool *exists=0)
 Get a config entry. The entry takes the form "{sectionname.}*entry, whereby sectionname is section[:name]. This method returns the "value"-field of the config entry only. More...
 
static std::string getEntry (const std::string &variable, const std::string &entry, bool *exists=0)
 Get a config entry. The entry takes the form "{sectionname.}*entry, whereby sectionname is section[:name]. This method returns the field given by "variable" of the config entry. More...
 
static std::string getEntry (const std::string &variable, const std::string &entry, const std::string &defaultValue, bool *exists=0)
 Get a config entry. The entry takes the form "{sectionname.}*entry, whereby sectionname is section[:name]. This method returns the field given by "variable" of the config entry. More...
 
static int getInt (const std::string &entry, int defaultValue, bool *exists=0)
 Get an integer value. More...
 
static int getInt (const std::string &variable, const std::string &entry, int defaultValue, bool *exists=0)
 Get an integer value. More...
 
static long getLong (const std::string &entry, long defaultValue, bool *exists=0)
 Get a long integer value. More...
 
static long getLong (const std::string &variable, const std::string &entry, long defaultValue, bool *exists=0)
 Get a long integer value. More...
 
static bool isOn (const std::string &entry, bool defaultValue, bool *exists=0)
 Checks if an option is on or off. As on counts "on", "true", and "1". More...
 
static bool isOn (const std::string &variable, const std::string &entry, bool defaultValue, bool *exists=0)
 Checks if an option is on or off. As on counts "on", "true", and "1". More...
 
static float getFloat (const std::string &entry, float defaultValue, bool *exists=0)
 Get a float value. More...
 
static float getFloat (const std::string &variable, const std::string &entry, float defaultValue, bool *exists=0)
 Get a float value. More...
 
static std::vector< std::stringgetScopeNames (const std::string &scope, const std::string &name="")
 
static ScopeEntries getScopeEntries (const std::string &scope)
 
static ScopeEntries getScopeEntries (const std::string &scope, const std::string &name)
 

Private Member Functions

 coCoviseConfig ()
 
virtual ~coCoviseConfig ()
 

Constructor & Destructor Documentation

coCoviseConfig::coCoviseConfig ( )
private
coCoviseConfig::~coCoviseConfig ( )
privatevirtual

Member Function Documentation

std::string coCoviseConfig::getEntry ( const std::string entry,
bool *  exists = 0 
)
static

Get a config entry. The entry takes the form "{sectionname.}*entry, whereby sectionname is section[:name]. This method returns the "value"-field of the config entry only.

Parameters
entryThe section to get the value from.
existsprovide a pointer to a bool here to get feedback, if the value exists.
Returns
the value of the section, or an empty string if nothing found.
std::string coCoviseConfig::getEntry ( const std::string variable,
const std::string entry,
bool *  exists = 0 
)
static

Get a config entry. The entry takes the form "{sectionname.}*entry, whereby sectionname is section[:name]. This method returns the field given by "variable" of the config entry.

Parameters
variableThe variable requested.
entryThe section to get the value from.
existsprovide a pointer to a bool here to get feedback, if the value exists.
Returns
the value of the variable in the denoted section, or an empty string if nothing found.
std::string coCoviseConfig::getEntry ( const std::string variable,
const std::string entry,
const std::string defaultValue,
bool *  exists = 0 
)
static

Get a config entry. The entry takes the form "{sectionname.}*entry, whereby sectionname is section[:name]. This method returns the field given by "variable" of the config entry.

Parameters
variableThe variable requested.
entryThe section to get the value from.
defaultValueThe default return value if nothing is found.
existsprovide a pointer to a bool here to get feedback, if the value exists.
Returns
the value of the variable in the denoted section, or the default value if nothing found.
float coCoviseConfig::getFloat ( const std::string entry,
float  defaultValue,
bool *  exists = 0 
)
static

Get a float value.

Parameters
entryThe section to get the value from.
defaultValueThe default return value if nothing is found.
existsprovide a pointer to a bool here to get feedback, if the value exists.
Returns
the value of the denoted section, or the default value if nothing found.
float coCoviseConfig::getFloat ( const std::string variable,
const std::string entry,
float  defaultValue,
bool *  exists = 0 
)
static

Get a float value.

Parameters
variableThe variable requested.
entryThe section to get the value from.
defaultValueThe default return value if nothing is found.
existsprovide a pointer to a bool here to get feedback, if the value exists.
Returns
the value of the variable in the denoted section, or the default value if nothing found.
int coCoviseConfig::getInt ( const std::string entry,
int  defaultValue,
bool *  exists = 0 
)
static

Get an integer value.

Parameters
entryThe section to get the value from.
defaultValueThe default return value if nothing is found.
existsprovide a pointer to a bool here to get feedback, if the value exists.
Returns
the value of the section, or the default value if nothing found.
int coCoviseConfig::getInt ( const std::string variable,
const std::string entry,
int  defaultValue,
bool *  exists = 0 
)
static

Get an integer value.

Parameters
variableThe variable requested.
entryThe section to get the value from.
defaultValueThe default return value if nothing is found.
existsprovide a pointer to a bool here to get feedback, if the value exists.
Returns
the value of the variable in the denoted section, or the default value if nothing found.
long coCoviseConfig::getLong ( const std::string entry,
long  defaultValue,
bool *  exists = 0 
)
static

Get a long integer value.

Parameters
entryThe section to get the value from.
defaultValueThe default return value if nothing is found.
existsprovide a pointer to a bool here to get feedback, if the value exists.
Returns
the value of the section, or the default value if nothing found.
long coCoviseConfig::getLong ( const std::string variable,
const std::string entry,
long  defaultValue,
bool *  exists = 0 
)
static

Get a long integer value.

Parameters
variableThe variable requested.
entryThe section to get the value from.
defaultValueThe default return value if nothing is found.
existsprovide a pointer to a bool here to get feedback, if the value exists.
Returns
the value of the variable in the denoted section, or the default value if nothing found.
coCoviseConfig::ScopeEntries coCoviseConfig::getScopeEntries ( const std::string scope)
static
coCoviseConfig::ScopeEntries coCoviseConfig::getScopeEntries ( const std::string scope,
const std::string name 
)
static
std::vector< std::string > coCoviseConfig::getScopeNames ( const std::string scope,
const std::string name = "" 
)
static
bool coCoviseConfig::isOn ( const std::string entry,
bool  defaultValue,
bool *  exists = 0 
)
static

Checks if an option is on or off. As on counts "on", "true", and "1".

Parameters
entryThe section to get the value from.
defaultValueThe default return value if nothing is found.
existsprovide a pointer to a bool here to get feedback, if the value exists.
Returns
true, if "value" in the denoted section is on, or the default value if nothing found.
bool coCoviseConfig::isOn ( const std::string variable,
const std::string entry,
bool  defaultValue,
bool *  exists = 0 
)
static

Checks if an option is on or off. As on counts "on", "true", and "1".

Parameters
variableThe variable requested.
entryThe section to get the value from.
defaultValueThe default return value if nothing is found.
existsprovide a pointer to a bool here to get feedback, if the value exists.
Returns
true, if the variable in the denoted section is on, or the default value if nothing found.

The documentation for this class was generated from the following files: