ADTF  3.18.2
cEnumerationType

Type implementation for enumerations. More...

Inheritance diagram for cEnumerationType:
[legend]

Classes

struct  tValue
 

Public Member Functions

 cEnumerationType (const std::string &strName, const std::shared_ptr< cType > &pUnderlyingType)
 Initializes the enumeration with a name and underlying type. More...
 
 cEnumerationType (const cEnumerationType &oOther)
 
std::string GetName () const override
 
size_t GetSize () const override
 
size_t GetAlignment () const override
 
const std::shared_ptr< cType > & GetUnderlyingType () const
 
const std::vector< tValue > & GetValues () const
 

Protected Member Functions

void Add (tValue &&sNewValue)
 Adds a new mapped value to the enumeration.
 

Private Attributes

std::string m_strName
 
std::shared_ptr< cTypem_pUnderlyingType
 
std::vector< tValuem_oValues
 

Detailed Description

Type implementation for enumerations.

Do not use this class directly, but use enumeration instead.

Definition at line 138 of file type_reflection_legacy.h.

Constructor & Destructor Documentation

◆ cEnumerationType()

cEnumerationType ( const std::string &  strName,
const std::shared_ptr< cType > &  pUnderlyingType 
)

Initializes the enumeration with a name and underlying type.

Parameters
[in]strNameThe name of the enumeration
[in]pUnderlyingTypeThe underlying type.

Member Function Documentation

◆ GetAlignment()

size_t GetAlignment ( ) const
overridevirtual
Returns
The default alignment of the type.

Implements cType.

◆ GetName()

std::string GetName ( ) const
overridevirtual
Returns
The name of the type.

Implements cType.

◆ GetSize()

size_t GetSize ( ) const
overridevirtual
Returns
The size of the type.

Implements cType.

◆ GetUnderlyingType()

const std::shared_ptr<cType>& GetUnderlyingType ( ) const
Returns
The underlying type.

◆ GetValues()

const std::vector<tValue>& GetValues ( ) const
Returns
The mapped values of the enumeration.