openModeller
Version 1.5.0
|
#include <Configuration.hh>
Public Member Functions | |
ConfigurationImpl (char const *name) | |
ConfigurationImpl () | |
std::string | getName () const |
void | setName (const std::string &) |
void | setValue (const std::string &) |
std::string | getValue () const |
ConstConfigurationPtr | getSubsection (const std::string &name, bool throws=true) const |
ConfigurationPtr | getSubsection (const std::string &name, bool throws=true) |
const Configuration::subsection_list & | getAllSubsections () const |
void | addSubsection (const ConfigurationPtr &config) |
std::string | getAttribute (const std::string &name) const |
std::string | getAttribute (const std::string &name, const std::string &defaultValue) const |
template<typename T > | |
std::vector< T > | getAttributeAsVec (const std::string &name) const |
int | getAttributeAsInt (const std::string &name, int defaultValue) const |
double | getAttributeAsDouble (const std::string &name, double defaultValue) const |
std::vector< double > | getAttributeAsVecDouble (const std::string &name) const |
void | getAttributeAsDoubleArray (const std::string &name, double **, int *) const |
std::vector< int > | getAttributeAsVecInt (const std::string &name) const |
void | getAttributeAsIntArray (const std::string &name, int **, int *) const |
Sample | getAttributeAsSample (const std::string &name) const |
void | getAttributeAsByteArray (const std::string &name, unsigned char **, int *) const |
const Configuration::attribute_list & | getAllAttributes () const |
void | addNameValue (const std::string &name, const std::string &value) |
void | addNameValue (const std::string &name, char const *value) |
void | addNameValue (const std::string &name, int value) |
void | addNameValue (const std::string &name, double value, int precision=25) |
void | addNameValue (const std::string &name, const Sample &value) |
void | addNameValue (const std::string &name, double const *values, int count, int precision=25) |
void | addNameValue (const std::string &name, int const *values, int count) |
void | addNameValue (const std::string &name, unsigned char const *values, int count) |
template<typename T > | |
vector< T > | getAttributeAsVec (const string &name) const |
Static Public Member Functions | |
static int | getInt (const std::string &str, int defaultValue) |
static double | getDouble (const std::string &str, double defaultValue) |
static Sample | getSample (const std::string &str) |
Private Member Functions | |
~ConfigurationImpl () | |
Private Member Functions inherited from ReferenceCountedObject | |
ReferenceCountedObject () | |
virtual | ~ReferenceCountedObject ()=0 |
Private Attributes | |
std::string | name |
std::string | value |
Configuration::subsection_list | subsections |
Configuration::attribute_list | attributes |
Friends | |
class | ReferenceCountedPointer< ConfigurationImpl > |
class | ReferenceCountedPointer< const ConfigurationImpl > |
Definition at line 58 of file Configuration.hh.
ConfigurationImpl::ConfigurationImpl | ( | char const * | name | ) |
Definition at line 126 of file Configuration.cpp.
ConfigurationImpl::ConfigurationImpl | ( | ) |
Definition at line 118 of file Configuration.cpp.
|
private |
Definition at line 134 of file Configuration.cpp.
void ConfigurationImpl::addNameValue | ( | const std::string & | name, |
const std::string & | value | ||
) |
void ConfigurationImpl::addNameValue | ( | const std::string & | name, |
char const * | value | ||
) |
void ConfigurationImpl::addNameValue | ( | const std::string & | name, |
int | value | ||
) |
void ConfigurationImpl::addNameValue | ( | const std::string & | name, |
double | value, | ||
int | precision = 25 |
||
) |
void ConfigurationImpl::addNameValue | ( | const std::string & | name, |
const Sample & | value | ||
) |
void ConfigurationImpl::addNameValue | ( | const std::string & | name, |
double const * | values, | ||
int | count, | ||
int | precision = 25 |
||
) |
void ConfigurationImpl::addNameValue | ( | const std::string & | name, |
int const * | values, | ||
int | count | ||
) |
void ConfigurationImpl::addNameValue | ( | const std::string & | name, |
unsigned char const * | values, | ||
int | count | ||
) |
void ConfigurationImpl::addSubsection | ( | const ConfigurationPtr & | config | ) |
Definition at line 205 of file Configuration.cpp.
References subsections.
|
inline |
Definition at line 147 of file Configuration.hh.
References attributes.
|
inline |
Definition at line 142 of file Configuration.hh.
References subsections.
std::string ConfigurationImpl::getAttribute | ( | const std::string & | name | ) | const |
std::string ConfigurationImpl::getAttribute | ( | const std::string & | name, |
const std::string & | defaultValue | ||
) | const |
void ConfigurationImpl::getAttributeAsByteArray | ( | const std::string & | name, |
unsigned char ** | , | ||
int * | |||
) | const |
Definition at line 378 of file Configuration.cpp.
References name.
double ConfigurationImpl::getAttributeAsDouble | ( | const std::string & | name, |
double | defaultValue | ||
) | const |
Definition at line 270 of file Configuration.cpp.
References getAttribute().
void ConfigurationImpl::getAttributeAsDoubleArray | ( | const std::string & | name, |
double ** | , | ||
int * | |||
) | const |
Definition at line 301 of file Configuration.cpp.
References getAttributeAsVecDouble().
int ConfigurationImpl::getAttributeAsInt | ( | const std::string & | name, |
int | defaultValue | ||
) | const |
Definition at line 258 of file Configuration.cpp.
References getAttribute().
void ConfigurationImpl::getAttributeAsIntArray | ( | const std::string & | name, |
int ** | , | ||
int * | |||
) | const |
Definition at line 341 of file Configuration.cpp.
References getAttributeAsVecInt().
Sample ConfigurationImpl::getAttributeAsSample | ( | const std::string & | name | ) | const |
Definition at line 364 of file Configuration.cpp.
References getAttribute().
std::vector<T> ConfigurationImpl::getAttributeAsVec | ( | const std::string & | name | ) | const |
vector<T> ConfigurationImpl::getAttributeAsVec | ( | const string & | name | ) | const |
Definition at line 240 of file Configuration.cpp.
References getAttribute().
vector< double > ConfigurationImpl::getAttributeAsVecDouble | ( | const std::string & | name | ) | const |
Definition at line 281 of file Configuration.cpp.
References getAttribute().
Referenced by getAttributeAsDoubleArray().
vector< int > ConfigurationImpl::getAttributeAsVecInt | ( | const std::string & | name | ) | const |
Definition at line 323 of file Configuration.cpp.
References getAttribute().
Referenced by getAttributeAsIntArray().
|
static |
Definition at line 99 of file Configuration.cpp.
|
static |
Definition at line 92 of file Configuration.cpp.
string ConfigurationImpl::getName | ( | ) | const |
Definition at line 138 of file Configuration.cpp.
References name.
|
static |
Definition at line 106 of file Configuration.cpp.
ConstConfigurationPtr ConfigurationImpl::getSubsection | ( | const std::string & | name, |
bool | throws = true |
||
) | const |
ConfigurationPtr ConfigurationImpl::getSubsection | ( | const std::string & | name, |
bool | throws = true |
||
) |
string ConfigurationImpl::getValue | ( | ) | const |
Definition at line 159 of file Configuration.cpp.
References value.
|
inline |
Definition at line 137 of file Configuration.hh.
References name.
void ConfigurationImpl::setValue | ( | const std::string & | ) |
|
friend |
Definition at line 60 of file Configuration.hh.
|
friend |
Definition at line 61 of file Configuration.hh.
|
private |
Definition at line 129 of file Configuration.hh.
Referenced by getAllAttributes().
|
private |
Definition at line 126 of file Configuration.hh.
Referenced by getAttributeAsByteArray(), getName(), and setName().
|
private |
Definition at line 128 of file Configuration.hh.
Referenced by addSubsection(), and getAllSubsections().
|
private |
Definition at line 127 of file Configuration.hh.
Referenced by getValue(), and setValue().