OpendTect-6_4  6.4
Classes | Macros
factory.h File Reference
Include dependency graph for factory.h:

Go to the source code of this file.

Classes

class  FactoryBase
 Base class for Factories ( Factory, Factory1Param, Factory2Param and Factory3Param. ) More...
 
class  Factory< T >
 Generalized static factory that can deliver instances of T, when no variable is needed in the creation. More...
 
class  Factory1Param< T, P >
 Generalized static factory that can deliver instances of T, when a variable is needed in the creation. More...
 
class  Factory2Param< T, P0, P1 >
 Subclass of FactoryBase. More...
 
class  Factory3Param< T, P0, P1, P2 >
 Subclass of FactoryBase. More...
 

Macros

#define mDefaultFactoryStringImpl
 
#define mDefaultStaticFactoryStringDeclaration
 
#define mDefaultFactoryInitClassImpl(baseclss, createfunc)
 
#define mDefaultFactoryInstanciationBase(keywrd, usernm)
 
#define mDefaultFactoryCreatorImpl(baseclss, clss)   static baseclss* createInstance() { return new clss; } \
 
#define mDefaultFactoryInstantiation(baseclss, clss, keywrd, usernm)
 
#define mDefaultFactoryCreatorImpl1Param(baseclss, clss, parclss)
 
#define mDefaultFactoryInstantiation1Param(baseclss, clss, parclss, keywrd, usernm)
 
#define mDefaultFactoryCreatorImpl2Param(baseclss, clss, parclss1, parclss2)
 
#define mDefaultFactoryInstantiation2Param(baseclss, clss, parclss1, parclss2, keywrd, usernm)
 
#define mCreateImpl(donames, createfunc)
 
#define mAddCreator
 
#define mDefineFactory(mod, T, funcname)   mGlobal(mod) ::Factory<T>& funcname()
 
#define mDefineFactoryInClasswKW(T, funcname, kw)
 
#define mDefineFactoryInClass(T, funcname)   mDefineFactoryInClasswKW( T, funcname, 0 )
 
#define mImplFactory(T, funcname)
 
#define mDefineFactory1Param(mod, T, P, funcname)   mGlobal(mod) ::Factory1Param<T,P>& funcname()
 
#define mDefineFactory1ParamInClasswKW(T, P, funcname, kw)
 
#define mDefineFactory1ParamInClass(T, P, funcname)   mDefineFactory1ParamInClasswKW( T, P, funcname, 0 )
 
#define mImplFactory1Param(T, P, funcname)
 
#define mDefineFactory2Param(mod, T, P0, P1, funcname)   mGlobal(mod) ::Factory2Param<T,P0,P1>& funcname()
 
#define mDefineFactory2ParamInClasswKW(T, P0, P1, funcname, kw)
 
#define mDefineFactory2ParamInClass(T, P0, P1, funcname)   mDefineFactory2ParamInClasswKW( T, P0, P1, funcname, 0 )
 
#define mImplFactory2Param(T, P0, P1, funcname)
 
#define mDefineFactory3Param(mod, T, P0, P1, P2, funcname)   mGlobal(mod) ::Factory3Param<T,P0,P1,P2>& funcname()
 
#define mDefineFactory3ParamInClasswKW(T, P0, P1, P2, funcname, kw)
 
#define mDefineFactory3ParamInClass(T, P0, P1, P2, funcname)   mDefineFactory3ParamInClasswKW( T, P0, P1, P2, funcname, 0 )
 
#define mImplFactory3Param(T, P0, P1, P2, funcname)
 

Macro Definition Documentation

#define mAddCreator
Value:
const int idx = indexOf( name );\
if ( idx==-1 )\
{ \
addNames( name, username ); \
creators_ += cr; \
} \
else\
{\
setNames( idx, name, username ); \
creators_[idx] = cr;\
}
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:169
void addNames(const ODSET &inp, WITHADD &withadd)
Adds all names from a set to another set with an add() function (typically a BufferStringSet) ...
Definition: odset.h:67
#define mCreateImpl (   donames,
  createfunc 
)
Value:
currentname_.getObject() = name; \
if ( donames ) \
{ \
const int idx = indexOf( name ); \
if ( idx==-1 ) \
{ \
errmsgs_.getObject() = "Name "; \
errmsgs_.getObject().add( name ).add(" not found.\n" ) \
.add( "Perhaps all plugins are not loaded\n" );\
return 0; \
} \
return createfunc; \
} \
\
for ( int idx=0; idx<creators_.size(); idx++ ) \
{ \
T* res = createfunc; \
if ( res ) return res; \
} \
\
return 0
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:169
#define mDefaultFactoryCreatorImpl (   baseclss,
  clss 
)    static baseclss* createInstance() { return new clss; } \
#define mDefaultFactoryCreatorImpl1Param (   baseclss,
  clss,
  parclss 
)
Value:
static baseclss* createInstance( parclss p1 ) \
{ return new clss( p1 ); }
#define mDefaultFactoryCreatorImpl2Param (   baseclss,
  clss,
  parclss1,
  parclss2 
)
Value:
static baseclss* createInstance( parclss1 p1, parclss2 p2 ) \
{ return new clss( p1, p2 ); }
#define mDefaultFactoryInitClassImpl (   baseclss,
  createfunc 
)
Value:
{ \
baseclss::factory().addCreator(createfunc,sFactoryKeyword(), \
sFactoryDisplayName()); \
}
#define mDefaultFactoryInstanciationBase (   keywrd,
  usernm 
)
Value:
mDefaultFactoryStringImpl \
static const char* sFactoryKeyword() { return keywrd; } \
static uiString sFactoryDisplayName() { return usernm; } \
static void initClass()
Definition: uistring.h:89
static void initClass()
#define mDefaultFactoryInstantiation (   baseclss,
  clss,
  keywrd,
  usernm 
)
Value:
mDefaultFactoryCreatorImpl( baseclss, clss ); \
mDefaultFactoryInstanciationBase( keywrd, usernm ) \
mDefaultFactoryInitClassImpl( baseclss, createInstance )
#define mDefaultFactoryCreatorImpl(baseclss, clss)
Definition: factory.h:286
#define mDefaultFactoryInstantiation1Param (   baseclss,
  clss,
  parclss,
  keywrd,
  usernm 
)
Value:
mDefaultFactoryCreatorImpl1Param( baseclss, clss, parclss ) \
mDefaultFactoryInstanciationBase( keywrd, usernm ) \
mDefaultFactoryInitClassImpl( baseclss, createInstance )
#define mDefaultFactoryCreatorImpl1Param(baseclss, clss, parclss)
Definition: factory.h:295
#define mDefaultFactoryInstantiation2Param (   baseclss,
  clss,
  parclss1,
  parclss2,
  keywrd,
  usernm 
)
Value:
mDefaultFactoryCreatorImpl2Param( baseclss, clss, parclss1, parclss2 ) \
mDefaultFactoryInstanciationBase( keywrd, usernm ) \
mDefaultFactoryInitClassImpl( baseclss, createInstance )
#define mDefaultFactoryCreatorImpl2Param(baseclss, clss, parclss1, parclss2)
Definition: factory.h:305
#define mDefaultFactoryStringImpl
Value:
const char* factoryKeyword() const { return sFactoryKeyword(); } \
uiString factoryDisplayName() const \
{ return sFactoryDisplayName(); }
const char * factoryKeyword() const
#define mDefaultStaticFactoryStringDeclaration
Value:
static const char* sFactoryKeyword(); \
static uiString sFactoryDisplayName()
Definition: uistring.h:89
#define mDefineFactory (   mod,
  T,
  funcname 
)    mGlobal(mod) ::Factory<T>& funcname()
#define mDefineFactory1Param (   mod,
  T,
  P,
  funcname 
)    mGlobal(mod) ::Factory1Param<T,P>& funcname()
#define mDefineFactory1ParamInClass (   T,
  P,
  funcname 
)    mDefineFactory1ParamInClasswKW( T, P, funcname, 0 )
#define mDefineFactory1ParamInClasswKW (   T,
  P,
  funcname,
  kw 
)
Value:
static ::Factory1Param<T,P>& funcname(); \
virtual uiString factoryDisplayName() const \
virtual const char* factoryKeyword() const { return kw; }
const char * factoryKeyword() const
Export_Basic uiString toUiString(ViewStyle)
Definition: uistring.h:89
#define mDefineFactory2Param (   mod,
  T,
  P0,
  P1,
  funcname 
)    mGlobal(mod) ::Factory2Param<T,P0,P1>& funcname()
#define mDefineFactory2ParamInClass (   T,
  P0,
  P1,
  funcname 
)    mDefineFactory2ParamInClasswKW( T, P0, P1, funcname, 0 )
#define mDefineFactory2ParamInClasswKW (   T,
  P0,
  P1,
  funcname,
  kw 
)
Value:
static ::Factory2Param<T,P0,P1>& funcname(); \
virtual uiString factoryDisplayName() const \
virtual const char* factoryKeyword() const { return kw; }
const char * factoryKeyword() const
Export_Basic uiString toUiString(ViewStyle)
Definition: uistring.h:89
#define mDefineFactory3Param (   mod,
  T,
  P0,
  P1,
  P2,
  funcname 
)    mGlobal(mod) ::Factory3Param<T,P0,P1,P2>& funcname()
#define mDefineFactory3ParamInClass (   T,
  P0,
  P1,
  P2,
  funcname 
)    mDefineFactory3ParamInClasswKW( T, P0, P1, P2, funcname, 0 )
#define mDefineFactory3ParamInClasswKW (   T,
  P0,
  P1,
  P2,
  funcname,
  kw 
)
Value:
static ::Factory3Param<T,P0,P1,P2>& funcname(); \
virtual uiString factoryDisplayName() const \
virtual const char* factoryKeyword() const { return kw; }
const char * factoryKeyword() const
Export_Basic uiString toUiString(ViewStyle)
Definition: uistring.h:89
#define mDefineFactoryInClass (   T,
  funcname 
)    mDefineFactoryInClasswKW( T, funcname, 0 )
#define mDefineFactoryInClasswKW (   T,
  funcname,
  kw 
)
Value:
static ::Factory<T>& funcname(); \
virtual uiString factoryDisplayName() const \
virtual const char* factoryKeyword() const { return kw; }
const char * factoryKeyword() const
Export_Basic uiString toUiString(ViewStyle)
Definition: uistring.h:89
#define mImplFactory (   T,
  funcname 
)
Value:
::Factory<T>& funcname() \
{ \
mDefineStaticLocalObject(PtrMan< ::Factory<T> >,inst,(new ::Factory<T>)); \
return *inst; \
}
Generalized static factory that can deliver instances of T, when no variable is needed in the creatio...
Definition: factory.h:118
Definition: ptrman.h:79
#define mImplFactory1Param (   T,
  P,
  funcname 
)
Value:
::Factory1Param<T,P>& funcname() \
{ \
mLockStaticInitLock( static_inst_lck__ ); \
inst(new ::Factory1Param<T,P>); \
mUnlockStaticInitLock( static_inst_lck__ ); \
\
return *inst; \
}
Definition: ptrman.h:79
Generalized static factory that can deliver instances of T, when a variable is needed in the creation...
Definition: factory.h:189
#define mImplFactory2Param (   T,
  P0,
  P1,
  funcname 
)
Value:
{ \
mLockStaticInitLock( static_inst_lck__ ); \
inst(new ::Factory2Param<T,P0,P1>); \
mUnlockStaticInitLock( static_inst_lck__ ); \
\
return *inst; \
}
Subclass of FactoryBase.
Definition: factory.h:216
Definition: ptrman.h:79
#define mImplFactory3Param (   T,
  P0,
  P1,
  P2,
  funcname 
)
Value:
{ \
mLockStaticInitLock( static_inst_lck__ ); \
inst(new ::Factory3Param<T,P0,P1,P2>); \
mUnlockStaticInitLock( static_inst_lck__ ); \
\
return *inst; \
}
Definition: ptrman.h:79
Subclass of FactoryBase.
Definition: factory.h:243

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