SDL enum implementation with common features. Enum value and string mapping are done in a brute-force way. This SDL enum type supports enum entries with identical value or name, which is useful for giving the user more tolerance on specifying inputs (e.g., case inconsistency). See getTypedEntry()
for more details.
More...
#include <TSdlGeneralEnum.h>
|
| TSdlGeneralEnum (std::string name) |
|
Entry | getEntry (const std::size_t entryIndex) const override |
|
std::size_t | numEntries () const override |
|
TSdlGeneralEnum & | addEntry (const EnumType enumValue, const std::string_view valueName, std::string description="") |
|
TEntry< EnumType > | getTypedEntry (const std::size_t entryIndex) const |
|
TEntry< EnumType > | getTypedEntry (const std::string_view entryName) const |
| Get an enum entry via an enum name. Note that the method cannot distinguish between identical enum names, i.e., if two entries have the same enum name, their entries cannot be uniquely identified and returned (however, the returned entry is consistent within the same SDL version).
|
|
TEntry< EnumType > | getTypedEntry (const EnumType enumValue) const |
| Get an enum entry via an enum value. Note that the method cannot distinguish between identical enum values, i.e., if two entries have the same enum value, their entries cannot be uniquely identified and returned (however, the returned entry is consistent within the same SDL version).
|
|
TSdlGeneralEnum & | description (std::string descriptionStr) |
|
| SdlEnum (std::string name) |
|
const std::string & | getName () const |
|
const std::string & | getDescription () const |
|
std::string | getEntryDescription (std::size_t entryIndex) const |
|
template<typename InEnumType, std::size_t MAX_ENTRIES = 64>
class ph::TSdlGeneralEnum< InEnumType, MAX_ENTRIES >
SDL enum implementation with common features. Enum value and string mapping are done in a brute-force way. This SDL enum type supports enum entries with identical value or name, which is useful for giving the user more tolerance on specifying inputs (e.g., case inconsistency). See getTypedEntry()
for more details.
◆ EnumType
template<typename InEnumType , std::size_t MAX_ENTRIES = 64>
◆ TSdlGeneralEnum()
template<typename InEnumType , std::size_t MAX_ENTRIES = 64>
◆ addEntry()
template<typename InEnumType , std::size_t MAX_ENTRIES = 64>
◆ description()
template<typename InEnumType , std::size_t MAX_ENTRIES = 64>
◆ getEntry()
template<typename InEnumType , std::size_t MAX_ENTRIES = 64>
◆ getTypedEntry() [1/3]
template<typename InEnumType , std::size_t MAX_ENTRIES = 64>
Get an enum entry via an enum value. Note that the method cannot distinguish between identical enum values, i.e., if two entries have the same enum value, their entries cannot be uniquely identified and returned (however, the returned entry is consistent within the same SDL version).
◆ getTypedEntry() [2/3]
template<typename InEnumType , std::size_t MAX_ENTRIES = 64>
◆ getTypedEntry() [3/3]
template<typename InEnumType , std::size_t MAX_ENTRIES = 64>
Get an enum entry via an enum name. Note that the method cannot distinguish between identical enum names, i.e., if two entries have the same enum name, their entries cannot be uniquely identified and returned (however, the returned entry is consistent within the same SDL version).
◆ numEntries()
template<typename InEnumType , std::size_t MAX_ENTRIES = 64>
The documentation for this class was generated from the following file: