Go to the source code of this file.
|
| class | QModFactory< T > |
| | abstract module factory and definition of macros that builds modulefactories and register function. More...
|
| |
◆ DECLARE_MODULE_FACTORY
| #define DECLARE_MODULE_FACTORY |
( |
|
clazz, |
|
|
|
modtype |
|
) |
| |
Value: class clazz ## Factory : public Diana::QModFactory<modtype>{\
public:\
private:\
modtype *GetObject(Diana::QSequence* s) {\
modtype* obj = new clazz();\
Diana::QBaseModule* bobj = (Diana::QBaseModule*) obj;\
bobj->Update(s,fOccurrence);\
return obj;\
}\
};
abstract module factory and definition of macros that builds modulefactories and register function.
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...
Definition at line 47 of file QBaseModuleFactory.hh.
◆ REGISTER_MOD
| #define REGISTER_MOD |
( |
|
clazz, |
|
|
|
modtype |
|
) |
| |
Value:
extern "C" void registerInFactory ## clazz() {\
Diana::QModFactory<modtype>* pt = new clazz ## Factory;\
Diana::QGeneralFactory::GetInstance().Register(pt);\
}
#define DECLARE_MODULE_FACTORY(clazz, modtype)
Definition at line 60 of file QBaseModuleFactory.hh.