SingleTypeVariantList Class Reference

The SingleTypeVariantList class is a subclass of VariantContainer and is comparable to a std::vector<T> containing values of type T. More...

#include <ArmarXCore/observers/variant/SingleTypeVariantList.h>

+ Inheritance diagram for SingleTypeVariantList:

Public Member Functions

void addElement (const VariantContainerBasePtr &variantContainer, const Ice::Current &c=Ice::emptyCurrent) override
 
void addVariant (const Variant &variant)
 
void clear (const Ice::Current &c=Ice::emptyCurrent) override
 
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 (int index) const
 
VariantContainerBasePtr getElementBase (int index, 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 (int index) const
 
Ice::ObjectPtr ice_clone () const override
 
SingleTypeVariantListoperator= (const SingleTypeVariantList &source)
 
void serialize (const ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
 
 SingleTypeVariantList ()
 
 SingleTypeVariantList (const ContainerType &subType)
 
 SingleTypeVariantList (const SingleTypeVariantList &source)
 
 SingleTypeVariantList (VariantTypeId subType)
 
template<typename Type >
std::vector< Type > toContainerStdVector () const
 
template<typename Type >
std::vector< Type > toStdVector () const
 
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 T1 >
static SingleTypeVariantListPtr FromContainerStdVector (const std::vector< T1 > &vec)
 
template<typename T1 >
static SingleTypeVariantListPtr FromStdVector (const std::vector< T1 > &vec)
 
static VariantTypeId getStaticType (const Ice::Current &c=Ice::emptyCurrent)
 
static std::string getTypePrefix ()
 
template<typename T1 , typename T2 >
static std::map< T1, T2 > MakeMap (SingleTypeVariantListPtr l1, SingleTypeVariantListPtr l2)
 

Detailed Description

The SingleTypeVariantList class is a subclass of VariantContainer and is comparable to a std::vector<T> containing values of type T.

Definition at line 47 of file SingleTypeVariantList.h.

Constructor & Destructor Documentation

◆ SingleTypeVariantList() [1/4]

Definition at line 36 of file SingleTypeVariantList.cpp.

+ Here is the caller graph for this function:

◆ SingleTypeVariantList() [2/4]

Definition at line 52 of file SingleTypeVariantList.cpp.

+ Here is the call graph for this function:

◆ SingleTypeVariantList() [3/4]

SingleTypeVariantList ( const ContainerType &  subType)
explicit

Definition at line 41 of file SingleTypeVariantList.cpp.

◆ SingleTypeVariantList() [4/4]

SingleTypeVariantList ( VariantTypeId  subType)
explicit

Definition at line 47 of file SingleTypeVariantList.cpp.

Member Function Documentation

◆ addElement()

void addElement ( const VariantContainerBasePtr &  variantContainer,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 84 of file SingleTypeVariantList.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addVariant()

void addVariant ( const Variant variant)

Definition at line 100 of file SingleTypeVariantList.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clear()

void clear ( const Ice::Current &  c = Ice::emptyCurrent)
override

Definition at line 114 of file SingleTypeVariantList.cpp.

◆ cloneContainer()

VariantContainerBasePtr cloneContainer ( const Ice::Current &  c = Ice::emptyCurrent) const
override

Definition at line 73 of file SingleTypeVariantList.cpp.

+ Here is the call graph for this function:

◆ deserialize()

void deserialize ( const ObjectSerializerBasePtr &  serializer,
const ::Ice::Current &  = Ice::emptyCurrent 
)
override

Definition at line 181 of file SingleTypeVariantList.cpp.

+ Here is the call graph for this function:

◆ FromContainerStdVector()

static SingleTypeVariantListPtr FromContainerStdVector ( const std::vector< T1 > &  vec)
inlinestatic

Definition at line 138 of file SingleTypeVariantList.h.

◆ FromStdVector()

static SingleTypeVariantListPtr FromStdVector ( const std::vector< T1 > &  vec)
inlinestatic

Definition at line 125 of file SingleTypeVariantList.h.

◆ getElement()

IceInternal::Handle<ContainerType> getElement ( int  index) const
inline

Definition at line 86 of file SingleTypeVariantList.h.

◆ getElementBase()

VariantContainerBasePtr getElementBase ( int  index,
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.

This function exists only for completeness and compatibility. Usually you should use the getElement()-function.

Parameters
indexis the index of the Element in the list
cNot needed, leave blank.
Exceptions
IndexOutOfBoundsException
Returns
a base variant pointer

Definition at line 143 of file SingleTypeVariantList.cpp.

+ Here is the call graph for this function:

◆ getSize()

int getSize ( const Ice::Current &  c = Ice::emptyCurrent) const
override

Definition at line 124 of file SingleTypeVariantList.cpp.

+ Here is the caller graph for this function:

◆ getStaticType()

VariantTypeId getStaticType ( const Ice::Current &  c = Ice::emptyCurrent)
static

Definition at line 119 of file SingleTypeVariantList.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getType()

Ice::Int getType ( const Ice::Current &  c = Ice::emptyCurrent) const
override

Definition at line 227 of file SingleTypeVariantList.cpp.

+ Here is the call graph for this function:

◆ getTypePrefix()

std::string getTypePrefix ( )
static

Definition at line 201 of file SingleTypeVariantList.cpp.

+ Here is the caller graph for this function:

◆ getVariant()

VariantPtr getVariant ( int  index) const

Definition at line 154 of file SingleTypeVariantList.cpp.

+ Here is the caller graph for this function:

◆ ice_clone()

Ice::ObjectPtr ice_clone ( ) const
override

Definition at line 79 of file SingleTypeVariantList.cpp.

+ Here is the call graph for this function:

◆ MakeMap()

static std::map<T1, T2> MakeMap ( SingleTypeVariantListPtr  l1,
SingleTypeVariantListPtr  l2 
)
inlinestatic

Definition at line 106 of file SingleTypeVariantList.h.

◆ operator=()

SingleTypeVariantList & operator= ( const SingleTypeVariantList source)

Definition at line 60 of file SingleTypeVariantList.cpp.

+ Here is the call graph for this function:

◆ serialize()

void serialize ( const ObjectSerializerBasePtr &  serializer,
const ::Ice::Current &  = Ice::emptyCurrent 
) const
override

Definition at line 166 of file SingleTypeVariantList.cpp.

◆ toContainerStdVector()

std::vector<Type> toContainerStdVector ( ) const
inline

Definition at line 170 of file SingleTypeVariantList.h.

◆ toStdVector()

std::vector<Type> toStdVector ( ) const
inline

Definition at line 158 of file SingleTypeVariantList.h.

◆ toString()

std::string toString ( const Ice::Current &  = Ice::emptyCurrent) const
override

Definition at line 207 of file SingleTypeVariantList.cpp.

◆ validateElements()

bool validateElements ( const Ice::Current &  c = Ice::emptyCurrent)
override

Definition at line 129 of file SingleTypeVariantList.cpp.


The documentation for this class was generated from the following files: