OpendTect-6_4  6.4
Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
EnumDefImpl< ENUM > Class Template Reference
Inheritance diagram for EnumDefImpl< ENUM >:
[legend]

Public Member Functions

 EnumDefImpl (const char *nm, const char *s[], short nrs=0)
 
bool parse (const char *txt, ENUM &res) const
 
bool parse (const IOPar &par, const char *key, ENUM &res) const
 
ENUM parse (const char *txt) const
 
ENUM getEnumForIndex (int idx) const
 
const char * getKey (ENUM theenum) const
 
uiString toUiString (ENUM theenum) const
 
const char * toString (ENUM theenum) const
 
- Public Member Functions inherited from EnumDef
 EnumDef ()
 
 EnumDef (const char *nm, const char *s[], short nrs=0)
 
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 BufferStringSetkeys () const
 
const uiStringSetstrings () 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 *linkedto)
 
 NamedObject (const NamedObject &)
 
virtual ~NamedObject ()
 
void setLinkedTo (NamedObject *)
 
bool operator== (const NamedObject &oth) const
 
virtual const OD::Stringname () const
 
virtual const OD::StringannotName () const
 
virtual void setName (const char *)
 
void setCleanName (const char *)
 cleans string first More...
 
void deleteNotify (const CallBack &)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Private Member Functions

void init ()
 

Static Private Member Functions

static uiString tr (const char *text, const char *disambiguation=0, int pluralnr=-1)
 
static uiString legacyTr (const char *text, const char *disambiguation=0, int pluralnr=-1)
 

Additional Inherited Members

- Protected Member Functions inherited from EnumDef
void fillUiStrings ()
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 
- Protected Attributes inherited from EnumDef
uiStringSet uistrings_
 
BufferStringSet keys_
 
TypeSet< int > enums_
 
BufferStringSet iconfiles_
 
- Protected Attributes inherited from NamedObject
BufferStringname_
 
NamedObjectlinkedto_
 
CallBackSetdelnotify_
 

Detailed Description

template<class ENUM>
class EnumDefImpl< ENUM >

Constructor & Destructor Documentation

template<class ENUM >
EnumDefImpl< ENUM >::EnumDefImpl ( const char *  nm,
const char *  s[],
short  nrs = 0 
)
inline

Member Function Documentation

template<class ENUM >
ENUM EnumDefImpl< ENUM >::getEnumForIndex ( int  idx) const
inline
template<class ENUM>
const char * EnumDefImpl< ENUM >::getKey ( ENUM  theenum) const
inline
template<class ENUM >
void EnumDefImpl< ENUM >::init ( )
inlineprivate
template<class ENUM>
static uiString EnumDefImpl< ENUM >::legacyTr ( const char *  text,
const char *  disambiguation = 0,
int  pluralnr = -1 
)
inlinestaticprivate
template<class ENUM>
bool EnumDefImpl< ENUM >::parse ( const char *  txt,
ENUM &  res 
) const
inline
template<class ENUM>
bool EnumDefImpl< ENUM >::parse ( const IOPar par,
const char *  key,
ENUM &  res 
) const
inline
template<class ENUM>
ENUM EnumDefImpl< ENUM >::parse ( const char *  txt) const
inline
template<class ENUM>
const char* EnumDefImpl< ENUM >::toString ( ENUM  theenum) const
inline
template<class ENUM>
uiString EnumDefImpl< ENUM >::toUiString ( ENUM  theenum) const
inline
template<class ENUM>
static uiString EnumDefImpl< ENUM >::tr ( const char *  text,
const char *  disambiguation = 0,
int  pluralnr = -1 
)
inlinestaticprivate

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019