IntEnum Class Reference

The IntEnum class. More...

#include <RobotAPI/libraries/aron/core/type/variant/enum/IntEnum.h>

+ Inheritance diagram for IntEnum:

Public Types

using Base = detail::EnumVariant< type::dto::IntEnum, IntEnum, int >
 
- Public Types inherited from EnumVariant< type::dto::IntEnum, IntEnum, int >
using Base = SpecializedVariantBase< type::dto::IntEnum, IntEnum >
 
using ValueType = int
 
- Public Types inherited from Variant
using PointerType = VariantPtr
 

Public Member Functions

std::string getFullName () const override
 get the full name of this specific type More...
 
std::string getShortName () const override
 get a short name of this specific type More...
 
 IntEnum (const Path &path=Path())
 
 IntEnum (const type::dto::IntEnum &, const Path &path=Path())
 
type::dto::IntEnumPtr toIntEnumDTO () const
 
- Public Member Functions inherited from EnumVariant< type::dto::IntEnum, IntEnum, int >
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 type::Descriptor &descriptor, const Path &path)
 
 SpecializedVariantBase (const type::dto::IntEnum &o, const type::Descriptor &descriptor, const Path &path)
 
virtual ~EnumVariant ()=default
 
- Public Member Functions inherited from SpecializedVariantBase< type::dto::IntEnum, IntEnum >
type::Maybe getMaybe () const override
 get the maybe type More...
 
VariantPtr navigateRelative (const Path &path) const override
 navigate relative More...
 
 operator type::dto::IntEnum ()
 
bool operator== (const IntEnum &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::IntEnum &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
virtual size_t childrenSize () const =0
 
virtual std::vector< VariantPtrgetChildren () const =0
 get all child elements More...
 
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
 

Additional Inherited Members

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

Detailed Description

The IntEnum class.

It represents the int enum type An int enum contains a map from strings to int values

Definition at line 42 of file IntEnum.h.

Member Typedef Documentation

◆ Base

using Base = detail::EnumVariant<type::dto::IntEnum, IntEnum, int>

Definition at line 45 of file IntEnum.h.

Constructor & Destructor Documentation

◆ IntEnum() [1/2]

IntEnum ( const Path path = Path())

Definition at line 30 of file IntEnum.cpp.

◆ IntEnum() [2/2]

IntEnum ( const type::dto::IntEnum &  o,
const Path path = Path() 
)

Definition at line 34 of file IntEnum.cpp.

Member Function Documentation

◆ getFullName()

std::string getFullName ( ) const
overridevirtual

get the full name of this specific type

Implements Variant.

Definition at line 53 of file IntEnum.cpp.

◆ getShortName()

std::string getShortName ( ) const
overridevirtual

get a short name of this specific type

Implements Variant.

Definition at line 47 of file IntEnum.cpp.

◆ toIntEnumDTO()

type::dto::IntEnumPtr toIntEnumDTO ( ) const

Definition at line 40 of file IntEnum.cpp.


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