SpecializedVariantBase< AronDataT, DerivedT > Class Template Referenceabstract

#include <RobotAPI/libraries/aron/core/data/variant/detail/SpecializedVariant.h>

+ Inheritance diagram for SpecializedVariantBase< AronDataT, DerivedT >:

Public Types

using AronDataType = AronDataT
 
using Base = data::Variant
 
using PointerType = std::shared_ptr< DerivedT >
 
- Public Types inherited from Variant
using PointerType = VariantPtr
 

Public Member Functions

virtual PointerType clone () const
 
virtual PointerType clone (const Path &newPath) const =0
 
VariantPtr cloneAsVariant () const override
 get a pointer to a copy of this variant More...
 
VariantPtr cloneAsVariant (const Path &newPath) const override
 
VariantPtr navigateRelative (const Path &path) const override
 navigate relative More...
 
 operator typename AronDataType::PointerType ()
 
virtual bool operator== (const DerivedT &) const =0
 
virtual bool operator== (const PointerType &other) const =0
 
bool operator== (const Variant &other) const override
 
 SpecializedVariantBase ()=delete
 
 SpecializedVariantBase (const data::Descriptor descriptor, const Path &path=Path())
 
 SpecializedVariantBase (const typename AronDataType::PointerType &o, const data::Descriptor descriptor, const Path &path=Path())
 
data::dto::GenericDataPtr toAronDTO () const override
 convert the variant to the ice representation More...
 
virtual ~SpecializedVariantBase ()=default
 
- Public Member Functions inherited from Variant
virtual size_t childrenSize () const =0
 get the children size of a data variant More...
 
virtual bool fullfillsType (const type::VariantPtr &) const =0
 checks, if the current data variant fullfills the given type More...
 
virtual std::vector< VariantPtrgetChildren () const =0
 get the children of a data variant More...
 
data::Descriptor getDescriptor () const
 getter for the descriptor enum More...
 
virtual std::string getFullName () const =0
 get the full str representation of this variant More...
 
Path getPath () const
 get the path More...
 
virtual std::string getShortName () const =0
 get a short str representation of this variant More...
 
virtual VariantPtr navigateAbsolute (const Path &path) const =0
 naviate absolute More...
 
bool operator== (const VariantPtr &other) const
 
std::string pathToString () const
 get the path as string More...
 
virtual type::VariantPtr recalculateType () const =0
 recalculate the type of a data variant. Please not tha the mapping ist NOT bijective, so the calculated type may be wrong More...
 
 Variant ()=delete
 
 Variant (const data::Descriptor &descriptor, const Path &path)
 
virtual ~Variant ()=default
 

Static Public Member Functions

static const DerivedT & DynamicCast (const Variant &n)
 
static PointerType DynamicCast (const VariantPtr &n)
 
static DerivedT & DynamicCast (Variant &n)
 
static PointerType DynamicCastAndCheck (const VariantPtr &n)
 
- Static Public Member Functions inherited from Variant
static VariantPtr FromAronDTO (const data::dto::GenericDataPtr &, const Path &=Path())
 create a variant from a dto object More...
 
static std::vector< VariantPtrFromAronDTO (const std::vector< data::dto::GenericDataPtr > &, const Path &=Path())
 create a list of variants from a list of dto objects More...
 
static std::vector< data::dto::GenericDataPtr > ToAronDTO (const std::vector< VariantPtr > &)
 return a list of dto objects from a list of variant objects More...
 

Protected Attributes

AronDataType::PointerType aron
 
- Protected Attributes inherited from Variant
const data::Descriptor descriptor
 
const Path path
 

Detailed Description

template<typename AronDataT, typename DerivedT>
class armarx::aron::data::detail::SpecializedVariantBase< AronDataT, DerivedT >

Definition at line 39 of file SpecializedVariant.h.

Member Typedef Documentation

◆ AronDataType

using AronDataType = AronDataT

Definition at line 44 of file SpecializedVariant.h.

◆ Base

Definition at line 42 of file SpecializedVariant.h.

◆ PointerType

using PointerType = std::shared_ptr<DerivedT>

Definition at line 43 of file SpecializedVariant.h.

Constructor & Destructor Documentation

◆ SpecializedVariantBase() [1/3]

◆ SpecializedVariantBase() [2/3]

SpecializedVariantBase ( const data::Descriptor  descriptor,
const Path path = Path() 
)
inline

Definition at line 49 of file SpecializedVariant.h.

◆ SpecializedVariantBase() [3/3]

SpecializedVariantBase ( const typename AronDataType::PointerType &  o,
const data::Descriptor  descriptor,
const Path path = Path() 
)
inline

Definition at line 54 of file SpecializedVariant.h.

◆ ~SpecializedVariantBase()

virtual ~SpecializedVariantBase ( )
virtualdefault

Member Function Documentation

◆ clone() [1/2]

◆ clone() [2/2]

◆ cloneAsVariant() [1/2]

VariantPtr cloneAsVariant ( ) const
inlineoverridevirtual

get a pointer to a copy of this variant

Implements Variant.

Definition at line 91 of file SpecializedVariant.h.

◆ cloneAsVariant() [2/2]

VariantPtr cloneAsVariant ( const Path newPath) const
inlineoverridevirtual

Implements Variant.

Definition at line 97 of file SpecializedVariant.h.

◆ DynamicCast() [1/3]

static const DerivedT& DynamicCast ( const Variant n)
inlinestatic

Definition at line 129 of file SpecializedVariant.h.

◆ DynamicCast() [2/3]

static PointerType DynamicCast ( const VariantPtr n)
inlinestatic

Definition at line 117 of file SpecializedVariant.h.

◆ DynamicCast() [3/3]

static DerivedT& DynamicCast ( Variant n)
inlinestatic

Definition at line 123 of file SpecializedVariant.h.

◆ DynamicCastAndCheck()

static PointerType DynamicCastAndCheck ( const VariantPtr n)
inlinestatic

Definition at line 135 of file SpecializedVariant.h.

◆ navigateRelative()

VariantPtr navigateRelative ( const Path path) const
inlineoverridevirtual

navigate relative

Implements Variant.

Definition at line 109 of file SpecializedVariant.h.

◆ operator typename AronDataType::PointerType()

operator typename AronDataType::PointerType ( )
inline

Definition at line 65 of file SpecializedVariant.h.

◆ operator==() [1/3]

virtual bool operator== ( const DerivedT &  ) const
pure virtual

Implemented in String, NDArray, Long, List, Int, Float, Double, Dict, and Bool.

◆ operator==() [2/3]

virtual bool operator== ( const PointerType other) const
pure virtual

◆ operator==() [3/3]

bool operator== ( const Variant other) const
inlineoverridevirtual

Implements Variant.

Definition at line 71 of file SpecializedVariant.h.

◆ toAronDTO()

data::dto::GenericDataPtr toAronDTO ( ) const
inlineoverridevirtual

convert the variant to the ice representation

Implements Variant.

Definition at line 103 of file SpecializedVariant.h.

+ Here is the caller graph for this function:

Member Data Documentation

◆ aron

AronDataType::PointerType aron
protected

Definition at line 154 of file SpecializedVariant.h.


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