MeVisLab Toolbox Reference
ml::EnumValues< EnumType > Class Template Reference

Helper class that stores a list of typed enum values and their string names. More...

#include <mlFields.h>

Classes

struct  Entry
 Defines the entry for one enum value. More...
 

Public Member Functions

void add (const char *stringValue, EnumType value)
 Adds an enum value, manually passing in the name and value.
 
void add (const std::string &stringValue, EnumType value)
 Adds an enum value, manually passing in the name and value.
 
void add (const Entry &value)
 Adds an enum value via the given entry, typically created with the ML_ENUM_VALUE() macro.
 
EnumValuesoperator<< (const Entry &value)
 Adds an enum value via the given entry, typically created with the ML_ENUM_VALUE() macro.
 
const std::vector< EnumField::EnumEntry > & getEntries () const
 Returns access to the collected list of enum entries.
 

Protected Attributes

std::vector< EnumField::EnumEntry_entries
 

Detailed Description

template<typename EnumType>
class ml::EnumValues< EnumType >

Helper class that stores a list of typed enum values and their string names.

It is used to pass the enum values to the constructor of TypedEnumField<>.

Definition at line 292 of file mlFields.h.

Member Function Documentation

◆ add() [1/3]

template<typename EnumType >
void ml::EnumValues< EnumType >::add ( const char * stringValue,
EnumType value )
inline

Adds an enum value, manually passing in the name and value.

Definition at line 308 of file mlFields.h.

◆ add() [2/3]

template<typename EnumType >
void ml::EnumValues< EnumType >::add ( const Entry & value)
inline

Adds an enum value via the given entry, typically created with the ML_ENUM_VALUE() macro.

Definition at line 318 of file mlFields.h.

References ml::EnumValues< EnumType >::Entry::stringValue, and ml::EnumValues< EnumType >::Entry::value.

◆ add() [3/3]

template<typename EnumType >
void ml::EnumValues< EnumType >::add ( const std::string & stringValue,
EnumType value )
inline

Adds an enum value, manually passing in the name and value.

Definition at line 313 of file mlFields.h.

◆ getEntries()

template<typename EnumType >
const std::vector< EnumField::EnumEntry > & ml::EnumValues< EnumType >::getEntries ( ) const
inline

Returns access to the collected list of enum entries.

Definition at line 329 of file mlFields.h.

◆ operator<<()

Adds an enum value via the given entry, typically created with the ML_ENUM_VALUE() macro.

Definition at line 323 of file mlFields.h.

Member Data Documentation

◆ _entries

template<typename EnumType >
std::vector<EnumField::EnumEntry> ml::EnumValues< EnumType >::_entries
protected

Definition at line 332 of file mlFields.h.


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