List of configuration specific attributes.
More...
#include <serverconfig.hpp>
|
void | add (const string &name, const string &value, const string type="") |
| Inserts attribute to attribute list.
|
|
void | clear () |
| Clears the list.
|
|
bool | contains (const string &name) const |
| Does this list contain a named attribute?
|
|
size_t | count () const |
| Amount of attributes held.
|
|
bool | getBool (const string &name, const bool defaultValue) const |
| Retrieve boolean type attribute.
|
|
int | getInt (const string &name, int defaultValue=0) const |
| Retrieve integer type attribute.
|
|
double | getReal (const string &name, const double defaultValue=0.0) const |
| Retrieve floating point type attribute.
|
|
string | getString (const string &name, string defaultValue="") const |
| Retrieve string type attribute.
|
|
string | getType (const string &name, const string defaultValue="") const |
| Retrieve the optional type of the given attribute.
|
|
vector< string > | keys () const |
| All attribute names.
|
|
void | setBool (const string &name, const bool value) |
| Set the attribute value to be specific.
|
|
void | setInt (const string &name, int value) |
| Sets the attribute value.
|
|
void | setReal (const string &name, const double value) |
| Set the attribute value to be specific.
|
|
void | setString (const string &name, string value) |
| Set the attribute value to be specific.
|
|
List of configuration specific attributes.
◆ add()
void kanzi::connect::ServerConfig::AttributeList::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. |
◆ clear()
void kanzi::connect::ServerConfig::AttributeList::clear |
( |
| ) |
|
◆ contains()
bool kanzi::connect::ServerConfig::AttributeList::contains |
( |
const string & | name | ) |
const |
Does this list contain a named attribute?
- Parameters
-
- Returns
- true if contains, false otherwise.
◆ count()
size_t kanzi::connect::ServerConfig::AttributeList::count |
( |
| ) |
const |
Amount of attributes held.
- Returns
- amount
◆ getBool()
bool kanzi::connect::ServerConfig::AttributeList::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
◆ getInt()
int kanzi::connect::ServerConfig::AttributeList::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
◆ getReal()
double kanzi::connect::ServerConfig::AttributeList::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
◆ getString()
string kanzi::connect::ServerConfig::AttributeList::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
◆ getType()
string kanzi::connect::ServerConfig::AttributeList::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.
◆ keys()
vector< string > kanzi::connect::ServerConfig::AttributeList::keys |
( |
| ) |
const |
All attribute names.
- Returns
- list of attribute names.
◆ setBool()
void kanzi::connect::ServerConfig::AttributeList::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 |
◆ setInt()
void kanzi::connect::ServerConfig::AttributeList::setInt |
( |
const string & | name, |
|
|
int | value ) |
Sets the attribute value.
- Parameters
-
name | the name of the attribute |
value | new value for the attribute. |
◆ setReal()
void kanzi::connect::ServerConfig::AttributeList::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 |
◆ setString()
void kanzi::connect::ServerConfig::AttributeList::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 |
The documentation for this class was generated from the following file: