ServerConfig::AttributeList¶
-
class
kanzi::connect::ServerConfig::AttributeList List of configuration specific attributes.
Public Functions
-
void
add(const string &name, const string &value, const string type = "") Inserts attribute to attribute list.
- Parameters
name – the name of the attribute
value – value for the attribute
type – optional type information for the attribute.
-
void
clear() Clears the list.
-
bool
contains(const string &name) const Does this list contain a named attribute?
- Parameters
the – name
- Returns
true if contains, false otherwise.
-
size_t
count() const Amount of attributes held.
- Returns
amount
-
bool
getBool(const string &name, const bool defaultValue) const Retrieve boolean type attribute.
- Parameters
name – the name of the attribute
defaultValue – the default value (optional) to return if not found.
- Returns
Attribute value
-
int
getInt(const string &name, int defaultValue = 0) const Retrieve integer type attribute.
- Parameters
name – the name of the attribute
defaultValue – the default value (optional) to return if not found.
- Returns
integer attribute value
-
double
getReal(const string &name, const double defaultValue = 0.0) const Retrieve floating point type attribute.
- Parameters
name – the name of the attribute
defaultValue – the default value (optional) to return if not found.
- Returns
Attribute value
-
string
getString(const string &name, string defaultValue = "") const Retrieve string type attribute.
- Parameters
name – the name of the attribute
defaultValue – the default value (optional) to return if not found.
- Returns
string attribute value
-
string
getType(const string &name, const string defaultValue = "") const Retrieve the optional type of the given attribute.
- Parameters
name – the name of the attribute
- Returns
optinal type for the attribute.
-
vector<string>
keys() const All attribute names.
- Returns
list of attribute names.
-
void
setBool(const string &name, const bool value) Set the attribute value to be specific.
- Parameters
name – of the attribute to set
value – value of the attribute
-
void
setInt(const string &name, int value) Sets the attribute value.
- Parameters
name – the name of the attribute
value – new value for the attribute.
-
void
setReal(const string &name, const double value) Set the attribute value to be specific.
- Parameters
name – of the attribute to set
value – value of the attribute
-
void
setString(const string &name, string value) Set the attribute value to be specific.
- Parameters
name – of the attribute to set
value – value of the attribute
-
void