![]() |
Plasma Engine
2.0
|
Stores the valid values and names for 'dynamic' enums. More...
#include <DynamicEnums.h>
Public Member Functions | |
const plMap< plInt32, plString > & | GetAllValidValues () const |
Returns all enum values and current names. | |
void | Clear () |
Resets the internal data. | |
void | SetValueAndName (plInt32 iValue, plStringView sNewName) |
Sets the name for the given enum value. | |
void | RemoveValue (plInt32 iValue) |
Removes a certain enum value, if it exists. | |
bool | IsValueValid (plInt32 iValue) const |
Returns whether a certain value is known. | |
plStringView | GetValueName (plInt32 iValue) const |
Returns the name for the given value. Returns "<invalid value>" if the value is not in use. | |
Static Public Member Functions | |
static plDynamicEnum & | GetDynamicEnum (const char *szEnumName) |
Returns a plDynamicEnum under the given name. Creates a new one, if the name has not been used before. | |
Stores the valid values and names for 'dynamic' enums.
The names and valid values for dynamic enums may change due to user configuration changes. The UI should show these user specified names without restarting the tool.
Call the static function GetDynamicEnum() to create or get the plDynamicEnum for a specific type.