Dict Class Reference

#include <RobotAPI/libraries/aron/core/data/variant/container/Dict.h>

+ Inheritance diagram for Dict:

Public Member Functions

void addElement (const std::string &key, const VariantPtr &=nullptr)
 
void addElementCopy (const std::string &key, const VariantPtr &=nullptr)
 
VariantPtr at (const std::string &) const
 
size_t childrenSize () const override
 get the children size of a data variant More...
 
void clear ()
 
DictPtr clone (const Path &p) const override
 
 Dict (const data::dto::DictPtr &, const Path &path=Path())
 
 Dict (const Path &path=Path())
 
 Dict (const std::map< std::string, VariantPtr > &, const Path &path=Path())
 
bool fullfillsType (const type::VariantPtr &) const override
 checks, if the current data variant fullfills the given type More...
 
std::vector< std::string > getAllKeys () const
 
std::string getAllKeysAsString () const
 
std::vector< VariantPtrgetChildren () const override
 get the children of a data variant More...
 
VariantPtr getElement (const std::string &) const
 
std::map< std::string, VariantPtrgetElements () const
 
std::string getFullName () const override
 get the full str representation of this variant More...
 
std::string getShortName () const override
 get a short str representation of this variant More...
 
bool hasElement (const std::string &) const
 
void mergeAndReplace (const DictPtr &d)
 
void mergeAndReplaceCopy (const DictPtr &d)
 
VariantPtr navigateAbsolute (const Path &path) const override
 naviate absolute More...
 
Dictoperator= (const Dict &)
 
bool operator== (const Dict &) const override
 
bool operator== (const DictPtr &) const override
 
VariantPtr operator[] (const std::string &) const
 
type::VariantPtr recalculateType () const override
 recalculate the type of a data variant. Please not tha the mapping ist NOT bijective, so the calculated type may be wrong More...
 
void removeElement (const std::string &key)
 
void setElement (const std::string &, const VariantPtr &=nullptr)
 
void setElementCopy (const std::string &, const VariantPtr &=nullptr)
 
data::dto::DictPtr toAronDictDTO () const
 
- Public Member Functions inherited from ContainerVariant< data::dto::Dict, Dict >
 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 ~ContainerVariant ()=default
 
- Public Member Functions inherited from SpecializedVariantBase< data::dto::Dict, Dict >
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 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 VariantPtr cloneAsVariant () const =0
 get a pointer to a copy of this variant More...
 
data::Descriptor getDescriptor () const
 getter for the descriptor enum More...
 
Path getPath () const
 get the path More...
 
bool operator== (const VariantPtr &other) const
 
std::string pathToString () const
 get the path as string More...
 
virtual data::dto::GenericDataPtr toAronDTO () const =0
 convert the variant to the ice representation More...
 
 Variant ()=delete
 
 Variant (const data::Descriptor &descriptor, const Path &path)
 
virtual ~Variant ()=default
 

Static Public Member Functions

static PointerType FromAronDictDTO (const data::dto::DictPtr &aron)
 
static data::dto::DictPtr ToAronDictDTO (const PointerType &navigator)
 
- Static Public Member Functions inherited from SpecializedVariantBase< data::dto::Dict, Dict >
static const DictDynamicCast (const Variant &n)
 
static PointerType DynamicCast (const VariantPtr &n)
 
static DictDynamicCast (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...
 

Additional Inherited Members

- Public Types inherited from ContainerVariant< data::dto::Dict, Dict >
using Base = SpecializedVariantBase< data::dto::Dict, Dict >
 
- Public Types inherited from SpecializedVariantBase< data::dto::Dict, Dict >
using AronDataType = data::dto::Dict
 
using Base = data::Variant
 
using PointerType = std::shared_ptr< Dict >
 
- Public Types inherited from Variant
using PointerType = VariantPtr
 
- Protected Attributes inherited from SpecializedVariantBase< data::dto::Dict, Dict >
AronDataType::PointerType aron
 
- Protected Attributes inherited from Variant
const data::Descriptor descriptor
 
const Path path
 

Detailed Description

Definition at line 44 of file Dict.h.

Constructor & Destructor Documentation

◆ Dict() [1/3]

Dict ( const Path path = Path())

Definition at line 38 of file Dict.cpp.

+ Here is the caller graph for this function:

◆ Dict() [2/3]

Dict ( const data::dto::DictPtr &  o,
const Path path = Path() 
)

Definition at line 44 of file Dict.cpp.

+ Here is the call graph for this function:

◆ Dict() [3/3]

Dict ( const std::map< std::string, VariantPtr > &  m,
const Path path = Path() 
)

Definition at line 55 of file Dict.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ addElement()

void addElement ( const std::string &  key,
const VariantPtr data = nullptr 
)

Definition at line 169 of file Dict.cpp.

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

◆ addElementCopy()

void addElementCopy ( const std::string &  key,
const VariantPtr data = nullptr 
)

Definition at line 183 of file Dict.cpp.

+ Here is the call graph for this function:

◆ at()

VariantPtr at ( const std::string &  s) const

Definition at line 310 of file Dict.cpp.

+ Here is the call graph for this function:

◆ childrenSize()

size_t childrenSize ( ) const
overridevirtual

get the children size of a data variant

Implements Variant.

Definition at line 428 of file Dict.cpp.

◆ clear()

void clear ( )

Definition at line 303 of file Dict.cpp.

◆ clone()

DictPtr clone ( const Path p) const
overridevirtual

Implements SpecializedVariantBase< data::dto::Dict, Dict >.

Definition at line 110 of file Dict.cpp.

+ Here is the call graph for this function:

◆ FromAronDictDTO()

DictPtr FromAronDictDTO ( const data::dto::DictPtr &  aron)
static

Definition at line 129 of file Dict.cpp.

+ Here is the caller graph for this function:

◆ fullfillsType()

bool fullfillsType ( const type::VariantPtr ) const
overridevirtual

checks, if the current data variant fullfills the given type

Implements Variant.

Definition at line 337 of file Dict.cpp.

+ Here is the call graph for this function:

◆ getAllKeys()

std::vector< std::string > getAllKeys ( ) const

Definition at line 152 of file Dict.cpp.

+ Here is the caller graph for this function:

◆ getAllKeysAsString()

std::string getAllKeysAsString ( ) const

Definition at line 163 of file Dict.cpp.

+ Here is the call graph for this function:

◆ getChildren()

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

get the children of a data variant

Implements Variant.

Definition at line 417 of file Dict.cpp.

◆ getElement()

VariantPtr getElement ( const std::string &  key) const

Definition at line 233 of file Dict.cpp.

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

◆ getElements()

std::map< std::string, VariantPtr > getElements ( ) const

Definition at line 249 of file Dict.cpp.

+ Here is the caller graph for this function:

◆ getFullName()

std::string getFullName ( ) const
overridevirtual

get the full str representation of this variant

Implements Variant.

Definition at line 323 of file Dict.cpp.

◆ getShortName()

std::string getShortName ( ) const
overridevirtual

get a short str representation of this variant

Implements Variant.

Definition at line 317 of file Dict.cpp.

◆ hasElement()

bool hasElement ( const std::string &  key) const

Definition at line 227 of file Dict.cpp.

+ Here is the caller graph for this function:

◆ mergeAndReplace()

void mergeAndReplace ( const DictPtr d)

Definition at line 197 of file Dict.cpp.

+ Here is the call graph for this function:

◆ mergeAndReplaceCopy()

void mergeAndReplaceCopy ( const DictPtr d)

Definition at line 212 of file Dict.cpp.

+ Here is the call graph for this function:

◆ navigateAbsolute()

VariantPtr navigateAbsolute ( const Path path) const
overridevirtual

naviate absolute

Implements Variant.

Definition at line 434 of file Dict.cpp.

+ Here is the call graph for this function:

◆ operator=()

Dict & operator= ( const Dict other)

Definition at line 102 of file Dict.cpp.

◆ operator==() [1/2]

bool operator== ( const Dict other) const
overridevirtual

Implements SpecializedVariantBase< data::dto::Dict, Dict >.

Definition at line 65 of file Dict.cpp.

+ Here is the call graph for this function:

◆ operator==() [2/2]

bool operator== ( const DictPtr other) const
override

Definition at line 86 of file Dict.cpp.

◆ operator[]()

VariantPtr operator[] ( const std::string &  s) const

Definition at line 96 of file Dict.cpp.

+ Here is the call graph for this function:

◆ recalculateType()

type::VariantPtr recalculateType ( ) const
overridevirtual

recalculate the type of a data variant. Please not tha the mapping ist NOT bijective, so the calculated type may be wrong

Implements Variant.

Definition at line 330 of file Dict.cpp.

◆ removeElement()

void removeElement ( const std::string &  key)

Definition at line 296 of file Dict.cpp.

◆ setElement()

void setElement ( const std::string &  key,
const VariantPtr data = nullptr 
)

Definition at line 255 of file Dict.cpp.

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

◆ setElementCopy()

void setElementCopy ( const std::string &  key,
const VariantPtr data = nullptr 
)

Definition at line 282 of file Dict.cpp.

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

◆ toAronDictDTO()

data::dto::DictPtr toAronDictDTO ( ) const

Definition at line 145 of file Dict.cpp.

+ Here is the caller graph for this function:

◆ ToAronDictDTO()

data::dto::DictPtr ToAronDictDTO ( const PointerType navigator)
static

Definition at line 139 of file Dict.cpp.

+ Here is the caller graph for this function:

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