|
#include <RobotAPI/libraries/aron/core/type/variant/container/Object.h>
Public Member Functions | |
void | addMemberType (const std::string &, const VariantPtr &) |
void | addTemplate (const std::string &) const |
void | addTemplateInstantiation (const std::string &) const |
bool | checkObjectName (const std::string &) const |
size_t | childrenSize () const override |
std::vector< std::string > | getAllKeys () const |
std::vector< VariantPtr > | getChildren () const override |
get all child elements More... | |
std::map< std::string, VariantPtr > | getDirectMemberTypes () const |
std::shared_ptr< Object > | getExtends () const |
std::string | getFullName () const override |
get the full name of this specific type More... | |
VariantPtr | getMemberType (const std::string &) const |
std::map< std::string, VariantPtr > | getMemberTypes () const |
std::string | getObjectName () const |
std::string | getObjectNameWithoutNamespace () const |
std::string | getObjectNameWithTemplateInstantiations () const |
std::string | getObjectNameWithTemplates () const |
std::string | getShortName () const override |
get a short name of this specific type More... | |
std::vector< std::string > | getTemplateInstantiations () const |
std::vector< std::string > | getTemplates () const |
bool | hasMemberType (const std::string &) const |
VariantPtr | navigateAbsolute (const Path &path) const override |
naviate absolute More... | |
Object (const Path &=Path()) | |
Object (const type::dto::AronObject &, const Path &=Path()) | |
void | setExtends (const std::shared_ptr< Object > &) |
void | setMemberTypes (const std::map< std::string, VariantPtr > &) |
void | setObjectName (const std::string &) |
void | setTemplateInstantiations (const std::vector< std::string > &) const |
void | setTemplates (const std::vector< std::string > &) |
type::dto::AronObjectPtr | toAronObjectDTO () const |
Public Member Functions inherited from ContainerVariant< type::dto::AronObject, Object > | |
virtual | ~ContainerVariant ()=default |
Public Member Functions inherited from SpecializedVariantBase< type::dto::AronObject, Object > | |
type::Maybe | getMaybe () const override |
get the maybe type More... | |
VariantPtr | navigateRelative (const Path &path) const override |
navigate relative More... | |
operator type::dto::AronObject () | |
bool | operator== (const Object &other) const |
bool | operator== (const Variant &other) const override |
void | setMaybe (const type::Maybe m) override |
set the maybetype of this type More... | |
SpecializedVariantBase (const type::Descriptor &descriptor, const Path &path) | |
SpecializedVariantBase (const type::dto::AronObject &o, const type::Descriptor &descriptor, const Path &path) | |
type::dto::GenericTypePtr | toAronDTO () const override |
convert this variant to a dto object. More... | |
virtual | ~SpecializedVariantBase ()=default |
Public Member Functions inherited from Variant | |
type::Descriptor | getDescriptor () const |
virtual type::Maybe | getMaybe () const =0 |
get the maybe type More... | |
Path | getPath () const |
bool | operator== (const VariantPtr &other) const |
std::string | pathToString () const |
virtual type::dto::GenericTypePtr | toAronDTO () const =0 |
convert this variant to a dto object. More... | |
Variant (const type::Descriptor &descriptor, const Path &path=Path()) | |
virtual | ~Variant ()=default |
Static Public Member Functions | |
static ObjectPtr | FromAronObjectDTO (const type::dto::AronObjectPtr &, const aron::Path &path=aron::Path()) |
static std::string | GetFullNamePrefix () |
static std::string | GetNamePrefix () |
static type::dto::AronObjectPtr | ToAronObjectDTO (const ObjectPtr &) |
Static Public Member Functions inherited from SpecializedVariantBase< type::dto::AronObject, Object > | |
static const Object & | DynamicCast (const Variant &n) |
static std::shared_ptr< Object > | DynamicCast (const VariantPtr &n) |
static Object & | DynamicCast (Variant &n) |
static std::shared_ptr< Object > | DynamicCastAndCheck (const VariantPtr &n) |
Static Public Member Functions inherited from Variant | |
static VariantPtr | FromAronDTO (const type::dto::GenericType &, const Path &=Path()) |
create a variant object from an dto object More... | |
Additional Inherited Members | |
Public Types inherited from Variant | |
using | PointerType = VariantPtr |
Protected Attributes inherited from SpecializedVariantBase< type::dto::AronObject, Object > | |
type::dto::AronObject ::PointerType | aron |
Protected Attributes inherited from Variant | |
const type::Descriptor | descriptor |
const Path | path |
The Object class.
It represents the object type An object may have different types for each member, here represented as a map, mapping from the member name (as string) to the type (as a variant)
Definition at line 34 of file Object.cpp.
void addMemberType | ( | const std::string & | k, |
const VariantPtr & | v | ||
) |
void addTemplate | ( | const std::string & | s | ) | const |
void addTemplateInstantiation | ( | const std::string & | s | ) | const |
bool checkObjectName | ( | const std::string & | s | ) | const |
Definition at line 74 of file Object.cpp.
|
overridevirtual |
Implements Variant.
Definition at line 304 of file Object.cpp.
|
static |
std::vector< std::string > getAllKeys | ( | ) | const |
|
overridevirtual |
std::map< std::string, VariantPtr > getDirectMemberTypes | ( | ) | const |
std::shared_ptr< Object > getExtends | ( | ) | const |
|
overridevirtual |
get the full name of this specific type
Implements Variant.
Definition at line 317 of file Object.cpp.
|
static |
Definition at line 324 of file Object.cpp.
VariantPtr getMemberType | ( | const std::string & | s | ) | const |
Definition at line 128 of file Object.cpp.
std::map< std::string, VariantPtr > getMemberTypes | ( | ) | const |
|
static |
Definition at line 330 of file Object.cpp.
std::string getObjectName | ( | ) | const |
std::string getObjectNameWithoutNamespace | ( | ) | const |
std::string getObjectNameWithTemplateInstantiations | ( | ) | const |
Definition at line 193 of file Object.cpp.
std::string getObjectNameWithTemplates | ( | ) | const |
Definition at line 203 of file Object.cpp.
|
overridevirtual |
get a short name of this specific type
Implements Variant.
Definition at line 310 of file Object.cpp.
std::vector< std::string > getTemplateInstantiations | ( | ) | const |
std::vector< std::string > getTemplates | ( | ) | const |
bool hasMemberType | ( | const std::string & | k | ) | const |
|
overridevirtual |
naviate absolute
Implements Variant.
Definition at line 336 of file Object.cpp.
void setExtends | ( | const std::shared_ptr< Object > & | p | ) |
Definition at line 170 of file Object.cpp.
void setMemberTypes | ( | const std::map< std::string, VariantPtr > & | memberTypes | ) |
void setObjectName | ( | const std::string & | n | ) |
Definition at line 162 of file Object.cpp.
void setTemplateInstantiations | ( | const std::vector< std::string > & | templateInstantiations | ) | const |
Definition at line 102 of file Object.cpp.
void setTemplates | ( | const std::vector< std::string > & | templates | ) |
Definition at line 96 of file Object.cpp.
type::dto::AronObjectPtr toAronObjectDTO | ( | ) | const |
Definition at line 279 of file Object.cpp.
|
static |