28 #ifndef _CONFIGURATION_HH_
29 #define _CONFIGURATION_HH_
47 typedef std::pair<std::string,std::string>
attribute;
70 std::string getName()
const;
71 void setName(
const std::string& );
73 void setValue(
const std::string& );
74 std::string getValue()
const;
80 ConfigurationPtr getSubsection(
const std::string& name,
bool throws =
true );
89 std::string getAttribute(
const std::string & name )
const;
92 std::string getAttribute(
const std::string & name,
const std::string & defaultValue )
const ;
95 std::vector<T> getAttributeAsVec(
const std::string& name )
const;
97 int getAttributeAsInt(
const std::string & name,
int defaultValue )
const;
98 double getAttributeAsDouble(
const std::string & name,
double defaultValue )
const;
99 std::vector<double> getAttributeAsVecDouble(
const std::string & name )
const;
100 void getAttributeAsDoubleArray(
const std::string & name,
double **,
int * )
const;
101 std::vector<int> getAttributeAsVecInt(
const std::string & name )
const;
102 void getAttributeAsIntArray(
const std::string & name,
int **,
int * )
const;
103 Sample getAttributeAsSample(
const std::string & name )
const;
104 void getAttributeAsByteArray(
const std::string & name,
unsigned char **,
int * )
const;
110 void addNameValue(
const std::string & name,
const std::string & value );
111 void addNameValue(
const std::string & name,
char const * value );
112 void addNameValue(
const std::string & name,
int value );
113 void addNameValue(
const std::string & name,
double value,
int precision=25 );
114 void addNameValue(
const std::string & name,
const Sample& value );
115 void addNameValue(
const std::string & name,
double const *values,
int count,
int precision=25 );
116 void addNameValue(
const std::string & name,
int const *values,
int count );
117 void addNameValue(
const std::string & name,
unsigned char const *values,
int count );
120 static int getInt(
const std::string& str,
int defaultValue );
122 static double getDouble(
const std::string& str,
double defaultValue );
124 static Sample getSample(
const std::string& str );
151 #endif // _CONFIGURATION_HH_
std::vector< ConfigurationPtr > subsection_list
ReferenceCountedPointer< const ConfigurationImpl > ConstConfigurationPtr
void setName(const std::string &)
ReferenceCountedPointer< ConfigurationImpl > ConfigurationPtr
const Configuration::attribute_list & getAllAttributes() const
Configuration::subsection_list subsections
std::vector< attribute > attribute_list
std::pair< std::string, std::string > attribute
const Configuration::subsection_list & getAllSubsections() const
Configuration::attribute_list attributes