![]() |
OpendTect
6.3
|
Holds data pertinent to a certain enum. It does not know the enum values themselves, but treat them as integers. More...
Public Member Functions | |
| EnumDef () | |
| EnumDef (const char *nm, const char *s[]) | |
| bool | isValidKey (const char *) const |
| int | indexOf (const char *s) const |
| int | indexOf (int enumval) const |
| int | getEnumValForIndex (int) const |
| const char * | getKeyForIndex (int i) const |
| uiString | getUiStringForIndex (int i) const |
| void | setUiStringForIndex (int, const uiString &) |
| const BufferStringSet & | keys () const |
| const uiStringSet & | strings () const |
| const char * | getIconFileForIndex (int idx) const |
| void | setIconFileForIndex (int idx, const char *) |
| int | size () const |
| void | remove (const char *key) |
| void | add (const char *key, const uiString &, int enumval, const char *iconfile) |
| bool | isValidName (const char *key) const |
| const char * | convert (int idx) const |
| int | convert (const char *txt) const |
Public Member Functions inherited from NamedObject | |
| NamedObject (const char *nm=0) | |
| NamedObject (const NamedObject &oth) | |
| virtual | ~NamedObject () |
| NamedObject & | operator= (const NamedObject &) |
| bool | operator== (const NamedObject &oth) const |
| virtual const OD::String & | name () const |
| virtual BufferString | getName () const |
| virtual void | setName (const char *nm) |
| bool | getNameFromPar (const IOPar &) |
| void | putNameInPar (IOPar &) const |
Protected Member Functions | |
| void | fillUiStrings () |
Protected Attributes | |
| uiStringSet | uistrings_ |
| BufferStringSet | keys_ |
| TypeSet< int > | enums_ |
| BufferStringSet | iconfiles_ |
Protected Attributes inherited from NamedObject | |
| BufferString | name_ |
Holds data pertinent to a certain enum. It does not know the enum values themselves, but treat them as integers.
In most cases, the inherited EnumDefImpl<ENUM> is used, but a stand-alone EnumDef can be used if one wants to use combinations of enums that are not available as EnumDefImpl.
A stand-alone EnumDef can be created as follows to create a combo box with all enums in Stats::Type without the average. Note: EnumDef is assumed to remain in memory.
| EnumDef::EnumDef | ( | ) |
| EnumDef::EnumDef | ( | const char * | nm, |
| const char * | s[] | ||
| ) |
| void EnumDef::add | ( | const char * | key, |
| const uiString & | , | ||
| int | enumval, | ||
| const char * | iconfile | ||
| ) |
| const char* EnumDef::convert | ( | int | idx | ) | const |
| int EnumDef::convert | ( | const char * | txt | ) | const |
|
protected |
| int EnumDef::getEnumValForIndex | ( | int | ) | const |
| const char* EnumDef::getIconFileForIndex | ( | int | idx | ) | const |
| const char* EnumDef::getKeyForIndex | ( | int | i | ) | const |
| uiString EnumDef::getUiStringForIndex | ( | int | i | ) | const |
| int EnumDef::indexOf | ( | const char * | s | ) | const |
| int EnumDef::indexOf | ( | int | enumval | ) | const |
| bool EnumDef::isValidKey | ( | const char * | ) | const |
| bool EnumDef::isValidName | ( | const char * | key | ) | const |
|
inline |
| void EnumDef::remove | ( | const char * | key | ) |
| void EnumDef::setIconFileForIndex | ( | int | idx, |
| const char * | |||
| ) |
| void EnumDef::setUiStringForIndex | ( | int | , |
| const uiString & | |||
| ) |
| int EnumDef::size | ( | ) | const |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017