|
|
The StringValueMap class is a subclass of VariantContainer and is comparable to a std::map<std::string, T> containing values of type T. More...
#include <ArmarXCore/observers/variant/StringValueMap.h>
Inheritance diagram for StringValueMap:Public Member Functions | |
| void | addElement (const std::string &key, const VariantContainerBasePtr &variantContainer, const Ice::Current &c=Ice::emptyCurrent) override |
| void | addVariant (const std::string &key, const Variant &variant) |
| void | clear (const Ice::Current &c=Ice::emptyCurrent) override |
| clear calls ::clear() on the internal StringValueMap::elements container More... | |
| VariantContainerBasePtr | cloneContainer (const Ice::Current &c=Ice::emptyCurrent) const override |
| void | deserialize (const ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override |
| template<typename ContainerType > | |
| IceInternal::Handle< ContainerType > | getElement (const std::string &key) const |
| getElement is the getter-function to retrieve variants from the list. More... | |
| VariantContainerBasePtr | getElementBase (const std::string &key, const Ice::Current &c=Ice::emptyCurrent) const override |
| getElementBase is the slice-interface implementation for getting an Element and only returns a basepointer, so a manual upcast is usually necessary. More... | |
| int | getSize (const Ice::Current &c=Ice::emptyCurrent) const override |
| Ice::Int | getType (const Ice::Current &c=Ice::emptyCurrent) const override |
| VariantPtr | getVariant (const std::string &key) const |
getVariant returns a pointer to a Variant object associated with key More... | |
| Ice::ObjectPtr | ice_clone () const override |
| StringValueMap & | operator= (const StringValueMap &source) |
| void | serialize (const ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override |
| void | setElement (const std::string &key, const VariantContainerBasePtr &variantContainer, const Ice::Current &c=Ice::emptyCurrent) override |
| template<typename ValueType > | |
| void | setElements (const std::map< std::string, ValueType > &map) |
setElements adds all pairs from map to the current instance using StringValueMap::setElement(). More... | |
| template<typename ValueType > | |
| void | setElements (const std::vector< std::string > &keyVec, const std::vector< ValueType > &values) |
setElements adds elements with keyVec as keys and values as associated values using StringValueMap::setElement(). More... | |
| StringValueMap (bool forceSingleTypeMap=true) | |
| StringValueMap (const ContainerType &subType) | |
| StringValueMap (const StringValueMap &source) | |
| StringValueMap (VariantTypeId subType) | |
| template<typename Type > | |
| std::map< std::string, Type > | toContainerStdMap () const |
| toContainerStdMap creates a std::map<std::string, Type> from this container. More... | |
| template<class ValueType > | |
| std::map< std::string, ValueType > | toStdMap () |
| toStdMap creates a std::map<std::string, ValueType> from this container. More... | |
| std::string | toString (const Ice::Current &=Ice::emptyCurrent) const override |
| bool | validateElements (const Ice::Current &c=Ice::emptyCurrent) override |
Public Member Functions inherited from VariantContainer | |
| VariantDataClassPtr | clone (const Ice::Current &c=Ice::emptyCurrent) const override |
| ContainerTypePtr | getContainerType (const Ice::Current &c=Ice::emptyCurrent) const override |
| Ice::Int | getType (const Ice::Current &c=Ice::emptyCurrent) const override |
| std::string | output (const Ice::Current &c=Ice::emptyCurrent) const override |
| void | setContainerType (const ContainerTypePtr &containerType, const Ice::Current &c=Ice::emptyCurrent) override |
| bool | validate (const Ice::Current &c=Ice::emptyCurrent) override |
Static Public Member Functions | |
| template<typename Type > | |
| static StringValueMapPtr | FromContainerStdMap (const std::map< std::string, Type > &map) |
| FromStdMap creates a StringValueMap from a std::map<std::string, Type>. More... | |
| template<typename Type > | |
| static StringValueMapPtr | FromStdMap (const std::map< std::string, Type > &map) |
| FromStdMap creates a StringValueMap from a std::map<std::string, Type>. More... | |
| static VariantTypeId | getStaticType (const Ice::Current &c=Ice::emptyCurrent) |
| static std::string | getTypePrefix () |
Protected Attributes | |
| bool | forceSingleTypeMap = true |
The StringValueMap class is a subclass of VariantContainer and is comparable to a std::map<std::string, T> containing values of type T.
Definition at line 47 of file StringValueMap.h.
| StringValueMap | ( | bool | forceSingleTypeMap = true | ) |
| StringValueMap | ( | const StringValueMap & | source | ) |
|
explicit |
Definition at line 49 of file StringValueMap.cpp.
|
explicit |
Definition at line 43 of file StringValueMap.cpp.
|
override |
Definition at line 91 of file StringValueMap.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void addVariant | ( | const std::string & | key, |
| const Variant & | variant | ||
| ) |
|
override |
clear calls ::clear() on the internal StringValueMap::elements container
| c |
Definition at line 132 of file StringValueMap.cpp.
|
override |
|
override |
|
inlinestatic |
FromStdMap creates a StringValueMap from a std::map<std::string, Type>.
Definition at line 229 of file StringValueMap.h.
|
inlinestatic |
FromStdMap creates a StringValueMap from a std::map<std::string, Type>.
Definition at line 203 of file StringValueMap.h.
Here is the caller graph for this function:
|
inline |
getElement is the getter-function to retrieve variants from the list.
| index | is the index of the Element in the list |
| IndexOutOfBoundsException |
Definition at line 132 of file StringValueMap.h.
|
override |
getElementBase is the slice-interface implementation for getting an Element and only returns a basepointer, so a manual upcast is usually necessary.
This function exists only for completeness and compatibility. Usually you should use the getElement()-function.
| index | is the index of the Element in the list |
| c | Not needed, leave blank. |
| IndexOutOfBoundsException |
Definition at line 164 of file StringValueMap.cpp.
|
override |
Definition at line 144 of file StringValueMap.cpp.
|
static |
Definition at line 138 of file StringValueMap.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
|
static |
| VariantPtr getVariant | ( | const std::string & | key | ) | const |
getVariant returns a pointer to a Variant object associated with key
| key |
Definition at line 177 of file StringValueMap.cpp.
|
override |
| StringValueMap & operator= | ( | const StringValueMap & | source | ) |
|
override |
Definition at line 209 of file StringValueMap.cpp.
|
override |
Definition at line 110 of file StringValueMap.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void setElements | ( | const std::map< std::string, ValueType > & | map | ) |
setElements adds all pairs from map to the current instance using StringValueMap::setElement().
Definition at line 277 of file StringValueMap.h.
Here is the call graph for this function:| void setElements | ( | const std::vector< std::string > & | keyVec, |
| const std::vector< ValueType > & | values | ||
| ) |
setElements adds elements with keyVec as keys and values as associated values using StringValueMap::setElement().
If the vectors sizes do not match, only the minimal amount of pairs is added.
Definition at line 289 of file StringValueMap.h.
Here is the call graph for this function:
|
inline |
toContainerStdMap creates a std::map<std::string, Type> from this container.
Type must be a subclass of VariantContainer. Use this for nested VariantContainers.
Definition at line 177 of file StringValueMap.h.
|
inline |
toStdMap creates a std::map<std::string, ValueType> from this container.
ValueType must be of a type that can be stored in a Variant.
Definition at line 158 of file StringValueMap.h.
|
override |
Definition at line 196 of file StringValueMap.cpp.
|
override |
Definition at line 150 of file StringValueMap.cpp.
|
protected |
Definition at line 256 of file StringValueMap.h.