OpendTect  6.3
Classes | Macros
saveablemanager.h File Reference
Include dependency graph for saveablemanager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SaveableManager
 Base class for managers of Saveable objects: loading and storing. More...
 

Macros

#define mDeclareSaveableManagerInstance(typ)
 
#define mDefineSaveableManagerInstance(typ)
 
#define mDefineStdFns(typ)
 

Macro Definition Documentation

#define mDeclareSaveableManagerInstance (   typ)
Value:
static typ& getInstance(); \
typ* clone() const { return 0; } \
mDeclInstanceCreatedNotifierAccess(typ)
#define mDefineSaveableManagerInstance (   typ)
Value:
\
static typ* theinst_ = 0; \
static Threads::Lock theinstcreatelock_(true); \
\
typ& typ::getInstance() \
{ \
if ( !theinst_ ) \
{ \
Threads::Locker locker( theinstcreatelock_ ); \
if ( !theinst_ ) \
theinst_ = new typ; \
} \
return *theinst_; \
}
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:51
#define mDefineInstanceCreatedNotifierAccess(clss)
Definition: notify.h:238
#define mDefineStdFns (   typ)
Value:
ObjID getID( const char* nm ) const \
{ return SaveableManager::getID(nm); } \
ObjID getID( const SharedObject& obj ) const \
{ return SaveableManager::getID(obj); } \
ObjID getID(const typ&) const; \
uiRetVal store(const typ&,const IOPar* ioobjpars=0) const; \
uiRetVal store(const typ&,const ObjID&,const IOPar* p=0) const; \
uiRetVal save(const typ&) const; \
bool needsSave(const typ&) const
Definition: sharedobject.h:18
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
ObjID getID(const SharedObject &) const

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