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.
 
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
 
SingleTypeVariantList & operator= (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.

Constructor & Destructor Documentation

◆ SingleTypeVariantList() [1/4]

◆ SingleTypeVariantList() [2/4]

◆ SingleTypeVariantList() [3/4]

SingleTypeVariantList ( const ContainerType & subType)
explicit

◆ SingleTypeVariantList() [4/4]

SingleTypeVariantList ( VariantTypeId subType)
explicit

Member Function Documentation

◆ addElement()

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

◆ addVariant()

void addVariant ( const Variant & variant)

◆ clear()

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

◆ cloneContainer()

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

◆ deserialize()

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

◆ FromContainerStdVector()

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

◆ FromStdVector()

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

◆ getElement()

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

◆ 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

◆ getSize()

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

◆ getStaticType()

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

◆ getType()

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

◆ getTypePrefix()

std::string getTypePrefix ( )
static

◆ getVariant()

VariantPtr getVariant ( int index) const

◆ ice_clone()

Ice::ObjectPtr ice_clone ( ) const
override

◆ MakeMap()

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

◆ operator=()

SingleTypeVariantList & operator= ( const SingleTypeVariantList & source)

◆ serialize()

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

◆ toContainerStdVector()

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

◆ toStdVector()

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

◆ toString()

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

◆ validateElements()

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

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