PrimitiveVariant< AronDataT, ValueT, DerivedT > Class Template Referenceabstract

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

+ Inheritance diagram for PrimitiveVariant< AronDataT, ValueT, DerivedT >:

Public Types

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

Public Member Functions

size_t childrenSize () const override
 get the children size of a data variant More...
 
virtual PointerType clone () const
 
PointerType clone (const Path &newPath) const override
 
virtual PointerType clone (const Path &newPath) const=0
 
virtual void fromString (const std::string &setter)=0
 set a primitive from a std string More...
 
DictPtr getAsDict () const
 
std::vector< VariantPtrgetChildren () const override
 get the children of a data variant More...
 
ValueT & getValue ()
 
ValueT getValue () const
 
VariantPtr navigateAbsolute (const Path &path) const override
 naviate absolute More...
 
 operator ValueT () const
 
DerivedT & operator= (const ValueT &x)
 
 PrimitiveVariant (const ValueT &v, const data::Descriptor descriptor, const Path &path=Path())
 
void setValue (const ValueT &x)
 
 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())
 
virtual ~PrimitiveVariant ()=default
 
- Public Member Functions inherited from SpecializedVariantBase< AronDataT, DerivedT >
virtual PointerType clone () const
 
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 bool fullfillsType (const type::VariantPtr &) const =0
 checks, if the current data variant fullfills the given type 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...
 
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
 

Additional Inherited Members

- Static Public Member Functions inherited from SpecializedVariantBase< AronDataT, DerivedT >
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 inherited from SpecializedVariantBase< AronDataT, DerivedT >
AronDataType::PointerType aron
 
- Protected Attributes inherited from Variant
const data::Descriptor descriptor
 
const Path path
 

Detailed Description

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

Definition at line 40 of file PrimitiveVariant.h.

Member Typedef Documentation

◆ Base

using Base = SpecializedVariantBase<AronDataT, DerivedT>

Definition at line 43 of file PrimitiveVariant.h.

◆ PointerType

using PointerType = std::shared_ptr<DerivedT>

Definition at line 44 of file PrimitiveVariant.h.

◆ ValueType

using ValueType = ValueT

Definition at line 45 of file PrimitiveVariant.h.

Constructor & Destructor Documentation

◆ PrimitiveVariant()

PrimitiveVariant ( const ValueT &  v,
const data::Descriptor  descriptor,
const Path path = Path() 
)
inline

Definition at line 50 of file PrimitiveVariant.h.

◆ ~PrimitiveVariant()

virtual ~PrimitiveVariant ( )
virtualdefault

Member Function Documentation

◆ childrenSize()

size_t childrenSize ( ) const
inlineoverridevirtual

get the children size of a data variant

Implements Variant.

Definition at line 108 of file PrimitiveVariant.h.

◆ clone() [1/3]

virtual PointerType clone
inline

Definition at line 82 of file SpecializedVariant.h.

◆ clone() [2/3]

PointerType clone ( const Path newPath) const
inlineoverridevirtual

Implements SpecializedVariantBase< AronDataT, DerivedT >.

Definition at line 95 of file PrimitiveVariant.h.

◆ clone() [3/3]

virtual PointerType clone

◆ fromString()

virtual void fromString ( const std::string &  setter)
pure virtual

set a primitive from a std string

Implemented in Int, Bool, Double, Float, Long, and String.

◆ getAsDict()

DictPtr getAsDict ( ) const
inline

Definition at line 117 of file PrimitiveVariant.h.

◆ getChildren()

std::vector<VariantPtr> getChildren ( ) const
inlineoverridevirtual

get the children of a data variant

Implements Variant.

Definition at line 102 of file PrimitiveVariant.h.

◆ getValue() [1/2]

ValueT& getValue ( )
inline

Definition at line 138 of file PrimitiveVariant.h.

◆ getValue() [2/2]

ValueT getValue ( ) const
inline

Definition at line 132 of file PrimitiveVariant.h.

+ Here is the caller graph for this function:

◆ navigateAbsolute()

VariantPtr navigateAbsolute ( const Path path) const
inlineoverridevirtual

naviate absolute

Implements Variant.

Definition at line 83 of file PrimitiveVariant.h.

◆ operator ValueT()

operator ValueT ( ) const
inline

Definition at line 60 of file PrimitiveVariant.h.

◆ operator=()

DerivedT& operator= ( const ValueT &  x)
inline

Definition at line 66 of file PrimitiveVariant.h.

◆ setValue()

void setValue ( const ValueT &  x)
inline

Definition at line 126 of file PrimitiveVariant.h.

◆ SpecializedVariantBase() [1/3]

◆ SpecializedVariantBase() [2/3]

Definition at line 49 of file SpecializedVariant.h.

◆ SpecializedVariantBase() [3/3]

Definition at line 54 of file SpecializedVariant.h.


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