#include <keyValues.h>
Public Types | |
typedef std::map< std::string, EnhancedTypeBase * > ::const_iterator | Iterator |
Key values iterator. | |
Public Member Functions | |
Iterator | begin () const |
The iterator begin() method. | |
Iterator | end () const |
The iterator end() method. | |
int | size () const |
Returns number of the key values stored in the current object. | |
template<typename T> | |
void | add (std::string key, ENumber< T > value) |
Adds a new ENumber<T> value. | |
template<typename T> | |
void | add (std::string key, EStr< T > value) |
Adds a new EString<T> value. | |
template<typename T> | |
void | add (std::string key, T value) |
Adds a new C++ built-in type or STL string type value. | |
void | add (std::string key, EnhancedTypeBase &value) |
Adds a new Enhanced data type value. | |
void | add (std::string key, EnhancedTypeBase *value) |
Adds a new Enhanced data type value. | |
void | addNoCopy (std::string key, EnhancedTypeBase *value) |
Adds a new Enhanced data type value. | |
EnhancedTypeBase & | get (const std::string &key) const |
Returns a value stored under the specified key. | |
bool | contains (const std::string &key) const |
Determines whether the KeyValues contain any value of specified key. | |
void | clear () |
Clears the container. |
KeyValues contain a list of key-value pairs which represents any single-attribute or composite (multi-attribute) key.
KeyValues can be used as a key in STL containers.
void iopc::KeyValues::add | ( | std::string | key, | |
ENumber< T > | value | |||
) | [inline] |
Adds a new ENumber<T> value.
key | Name of the key (i.e. attribute name) | |
value | The value |
void iopc::KeyValues::add | ( | std::string | key, | |
EStr< T > | value | |||
) | [inline] |
Adds a new EString<T> value.
key | Name of the key (i.e. attribute name) | |
value | The value |
void iopc::KeyValues::add | ( | std::string | key, | |
T | value | |||
) | [inline] |
Adds a new C++ built-in type or STL string type value.
key | Name of the key (i.e. attribute name) | |
value | The value |
void iopc::KeyValues::add | ( | std::string | key, | |
EnhancedTypeBase & | value | |||
) |
Adds a new Enhanced data type value.
key | Name of the key (i.e. attribute name) | |
value | The value, a copy is created |
void iopc::KeyValues::add | ( | std::string | key, | |
EnhancedTypeBase * | value | |||
) |
Adds a new Enhanced data type value.
key | Name of the key (i.e. attribute name) | |
value | The value, a copy is created |
void iopc::KeyValues::addNoCopy | ( | std::string | key, | |
EnhancedTypeBase * | value | |||
) |
Adds a new Enhanced data type value.
key | Name of the key (i.e. attribute name) | |
value | A pointer to the value, no copy is created. |
EnhancedTypeBase& iopc::KeyValues::get | ( | const std::string & | key | ) | const |
Returns a value stored under the specified key.
IopcNotFoundException | if no such key value could be found |
void iopc::KeyValues::clear | ( | ) |
Clears the container.
Deallocates all values - copied and even those added using addNoCopy