ADTF
Loading...
Searching...
No Matches
adtf::mediadescription::flash::cEnumerationType Class Reference

#include <type_reflection_legacy.h>

Inherits adtf::mediadescription::flash::cType.

Inherited by adtf::mediadescription::flash::enumeration< UnderlyingType, typename std::enable_if< std::is_arithmetic< UnderlyingType >::value >::type >, adtf::mediadescription::flash::enumeration< Type, Enable >, and adtf::mediadescription::flash::enumeration< UnderlyingType, typename std::enable_if< std::is_arithmetic< UnderlyingType >::value >::type >.

Classes

struct  tValue
 

Public Member Functions

 cEnumerationType (const std::string &strName, const std::shared_ptr< cType > &pUnderlyingType)
 
 cEnumerationType (const cEnumerationType &oOther)
 
 ~cEnumerationType () override=default
 
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)
 

Detailed Description

Type implementation for enumerations.

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

Constructor & Destructor Documentation

◆ cEnumerationType() [1/2]

adtf::mediadescription::flash::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.

◆ cEnumerationType() [2/2]

adtf::mediadescription::flash::cEnumerationType::cEnumerationType ( const cEnumerationType & oOther)

Copy constructor.

Parameters
[in]oOtherThe other enumeration type to copy.

◆ ~cEnumerationType()

adtf::mediadescription::flash::cEnumerationType::~cEnumerationType ( )
overridedefault

destructor.

Member Function Documentation

◆ Add()

void adtf::mediadescription::flash::cEnumerationType::Add ( tValue && sNewValue)
protected

Adds a new mapped value to the enumeration.

◆ GetAlignment()

size_t adtf::mediadescription::flash::cEnumerationType::GetAlignment ( ) const
overridevirtual
Returns
The alignment of the enumeration, which is the alignment of the underlying type.

Implements adtf::mediadescription::flash::cType.

◆ GetName()

std::string adtf::mediadescription::flash::cEnumerationType::GetName ( ) const
overridevirtual
Returns
the name of the enumeration.

Implements adtf::mediadescription::flash::cType.

◆ GetSize()

size_t adtf::mediadescription::flash::cEnumerationType::GetSize ( ) const
overridevirtual
Returns
The size of the enumeration, which is the size of the underlying type.

Implements adtf::mediadescription::flash::cType.

◆ GetUnderlyingType()

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

◆ GetValues()

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

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