EnumVariant< AronTypeT, DerivedT, ValueT > Class Template Reference

#include <RobotAPI/libraries/aron/core/type/variant/detail/EnumVariant.h>

+ Inheritance diagram for EnumVariant< AronTypeT, DerivedT, ValueT >:

Public Types

using Base = SpecializedVariantBase< AronTypeT, DerivedT >
 
using ValueType = ValueT
 
- Public Types inherited from Variant
using PointerType = VariantPtr
 

Public Member Functions

void addAcceptedValue (const std::string &s, ValueType i)
 
size_t childrenSize () const override
 
std::map< std::string, int > getAcceptedValueMap () const
 
std::vector< std::string > getAcceptedValueNames () const
 
std::vector< ValueTypegetAcceptedValues () const
 
std::vector< VariantPtrgetChildren () const override
 get all child elements More...
 
ValueType getDefaultValue () const
 
std::string getDefaultValueName () const
 
std::string getEnumName () const
 
int getValue (const std::string &s) const
 
std::string getValueName (ValueType i) const
 
VariantPtr navigateAbsolute (const Path &path) const override
 naviate absolute More...
 
void setAcceptedValueMap (const std::map< std::string, ValueType > &valueMap)
 
void setDefaultValue (const ValueType &v)
 
void setDefaultValueName (const std::string &v)
 
void setEnumName (const std::string &s)
 
 SpecializedVariantBase (const AronTypeT &o, const type::Descriptor &descriptor, const Path &path)
 
 SpecializedVariantBase (const type::Descriptor &descriptor, const Path &path)
 
virtual ~EnumVariant ()=default
 
- Public Member Functions inherited from SpecializedVariantBase< AronTypeT, DerivedT >
type::Maybe getMaybe () const override
 get the maybe type More...
 
VariantPtr navigateRelative (const Path &path) const override
 navigate relative More...
 
 operator AronTypeT ()
 
bool operator== (const DerivedT &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 AronTypeT &o, const type::Descriptor &descriptor, const Path &path)
 
 SpecializedVariantBase (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 std::string getFullName () const =0
 get the full name of this specific type More...
 
Path getPath () const
 
virtual std::string getShortName () const =0
 get a short name of this specific type More...
 
bool operator== (const VariantPtr &other) const
 
std::string pathToString () const
 
 Variant (const type::Descriptor &descriptor, const Path &path=Path())
 
virtual ~Variant ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from SpecializedVariantBase< AronTypeT, DerivedT >
static const DerivedT & DynamicCast (const Variant &n)
 
static std::shared_ptr< DerivedT > DynamicCast (const VariantPtr &n)
 
static DerivedT & DynamicCast (Variant &n)
 
static std::shared_ptr< DerivedT > 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...
 
- Protected Attributes inherited from SpecializedVariantBase< AronTypeT, DerivedT >
AronTypeT::PointerType aron
 
- Protected Attributes inherited from Variant
const type::Descriptor descriptor
 
const Path path
 

Detailed Description

template<typename AronTypeT, typename DerivedT, typename ValueT>
class armarx::aron::type::detail::EnumVariant< AronTypeT, DerivedT, ValueT >

Definition at line 39 of file EnumVariant.h.

Member Typedef Documentation

◆ Base

using Base = SpecializedVariantBase<AronTypeT, DerivedT>

Definition at line 43 of file EnumVariant.h.

◆ ValueType

using ValueType = ValueT

Definition at line 42 of file EnumVariant.h.

Constructor & Destructor Documentation

◆ ~EnumVariant()

virtual ~EnumVariant ( )
virtualdefault

Member Function Documentation

◆ addAcceptedValue()

void addAcceptedValue ( const std::string &  s,
ValueType  i 
)
inline

Definition at line 141 of file EnumVariant.h.

◆ childrenSize()

size_t childrenSize ( ) const
inlineoverridevirtual

Implements Variant.

Definition at line 67 of file EnumVariant.h.

◆ getAcceptedValueMap()

std::map<std::string, int> getAcceptedValueMap ( ) const
inline

Definition at line 79 of file EnumVariant.h.

+ Here is the caller graph for this function:

◆ getAcceptedValueNames()

std::vector<std::string> getAcceptedValueNames ( ) const
inline

Definition at line 85 of file EnumVariant.h.

+ Here is the caller graph for this function:

◆ getAcceptedValues()

std::vector<ValueType> getAcceptedValues ( ) const
inline

Definition at line 96 of file EnumVariant.h.

◆ getChildren()

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

get all child elements

Implements Variant.

Definition at line 61 of file EnumVariant.h.

◆ getDefaultValue()

ValueType getDefaultValue ( ) const
inline

Definition at line 153 of file EnumVariant.h.

◆ getDefaultValueName()

std::string getDefaultValueName ( ) const
inline

Definition at line 147 of file EnumVariant.h.

+ Here is the caller graph for this function:

◆ getEnumName()

std::string getEnumName ( ) const
inline

Definition at line 129 of file EnumVariant.h.

+ Here is the caller graph for this function:

◆ getValue()

int getValue ( const std::string &  s) const
inline

Definition at line 123 of file EnumVariant.h.

◆ getValueName()

std::string getValueName ( ValueType  i) const
inline

Definition at line 107 of file EnumVariant.h.

◆ navigateAbsolute()

VariantPtr navigateAbsolute ( const Path path) const
inlineoverridevirtual

naviate absolute

Implements Variant.

Definition at line 51 of file EnumVariant.h.

◆ setAcceptedValueMap()

void setAcceptedValueMap ( const std::map< std::string, ValueType > &  valueMap)
inline

Definition at line 73 of file EnumVariant.h.

◆ setDefaultValue()

void setDefaultValue ( const ValueType v)
inline

Definition at line 164 of file EnumVariant.h.

◆ setDefaultValueName()

void setDefaultValueName ( const std::string &  v)
inline

Definition at line 178 of file EnumVariant.h.

◆ setEnumName()

void setEnumName ( const std::string &  s)
inline

Definition at line 135 of file EnumVariant.h.

◆ SpecializedVariantBase() [1/2]

Definition at line 49 of file SpecializedVariant.h.

◆ SpecializedVariantBase() [2/2]

Definition at line 44 of file SpecializedVariant.h.


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