VariantContainer Class Reference

VariantContainer is the base class of all other Variant container classes. More...

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

+ Inheritance diagram for VariantContainer:

Public Member Functions

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
 

Detailed Description

VariantContainer is the base class of all other Variant container classes.

Each VariantContainer can contain values of the types

Since VariantContainer inherits from VariantDataClass it is possible to put a VariantContainer into a Variant to send it via Ice.

See also
StringValueMap
SingleTypeVariantList
// VariantContainer can be replaced with any subclass of it
armarx::VariantContainerPtr variantContainer;
// create variant from VariantContainer
armarx::VariantPtr variant = new armarx::Variant(variantContainer);
// get VariantContainer from Variant
armarx::VariantContainerPtr variantContainer2 = variant->get<armarx::VariantContainer>();
if (variantContainer2)
{
// work with the container
}
else
{
// value of the variant was not a VariantContainer
}

Definition at line 85 of file VariantContainer.h.

Member Function Documentation

◆ clone()

VariantDataClassPtr clone ( const Ice::Current &  c = Ice::emptyCurrent) const
override

Definition at line 358 of file VariantContainer.cpp.

+ Here is the caller graph for this function:

◆ getContainerType()

ContainerTypePtr getContainerType ( const Ice::Current &  c = Ice::emptyCurrent) const
override

Definition at line 348 of file VariantContainer.cpp.

+ Here is the caller graph for this function:

◆ getType()

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

Definition at line 368 of file VariantContainer.cpp.

◆ output()

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

Definition at line 363 of file VariantContainer.cpp.

+ Here is the call graph for this function:

◆ setContainerType()

void setContainerType ( const ContainerTypePtr &  containerType,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 353 of file VariantContainer.cpp.

◆ validate()

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

Definition at line 373 of file VariantContainer.cpp.


The documentation for this class was generated from the following files:
armarx::Variant
The Variant class is described here: Variants.
Definition: Variant.h:224
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::VariantContainer
VariantContainer is the base class of all other Variant container classes.
Definition: VariantContainer.h:85