ADTF  3.18.2
enumeration< Type, Enable >

This is used to create an enumeration ytpe from an existing c++ enum. More...

Inheritance diagram for enumeration< Type, Enable >:
[legend]

Public Member Functions

 enumeration (const std::string &strName)
 
enumerationAdd (const std::string &strName, Type eValue)
 Adds a new mapped value to the enumeration. More...
 
- Public Member Functions inherited from cEnumerationType
 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
 

Additional Inherited Members

- Protected Member Functions inherited from cEnumerationType
void Add (tValue &&sNewValue)
 Adds a new mapped value to the enumeration.
 

Detailed Description

template<typename Type, typename Enable = void>
class adtf::mediadescription::flash::enumeration< Type, Enable >

This is used to create an enumeration ytpe from an existing c++ enum.

Example Usage

enum tMyEnum
{
eA = 0,
eB = 1
};
auto oMyEnumType = enumeration<tMyEnum>("tMyEnum")
.Add("eA", eA)
.Add("eB", eB);

Definition at line 200 of file type_reflection_legacy.h.

Constructor & Destructor Documentation

◆ enumeration()

enumeration ( const std::string &  strName)
inline
Parameters
[in]strNameThe name of the enumeration.

Definition at line 206 of file type_reflection_legacy.h.

Member Function Documentation

◆ Add()

enumeration& Add ( const std::string &  strName,
Type  eValue 
)
inline

Adds a new mapped value to the enumeration.

Parameters
[in]strNameThe name of the value.
[in]eValueThe value.
Returns
A reference to the enumeration.

Definition at line 218 of file type_reflection_legacy.h.

References cEnumerationType::Add().