1 #ifndef _Q_BASE_MODULE_FACTORY_HH_
2 #define _Q_BASE_MODULE_FACTORY_HH_
47 #define DECLARE_MODULE_FACTORY(clazz,modtype) \
48 class clazz ## Factory : public Diana::QModFactory<modtype>{\
50 clazz ## Factory() : Diana::QModFactory<modtype>(#clazz) {}\
52 modtype *GetObject(Diana::QSequence* s) {\
53 modtype* obj = new clazz();\
54 Diana::QBaseModule* bobj = (Diana::QBaseModule*) obj;\
55 bobj->Update(s,fOccurrence);\
60 #define REGISTER_MOD(clazz,modtype) \
61 DECLARE_MODULE_FACTORY(clazz,modtype);\
62 extern "C" void registerInFactory ## clazz() {\
63 Diana::QModFactory<modtype>* pt = new clazz ## Factory;\
64 Diana::QGeneralFactory::GetInstance().Register(pt);\
#define Q_BEGIN_NAMESPACE
This class take care of plugin registration and creation.
abstract module factory and definition of macros that builds modulefactories and register function.
const std::string & GetName() const
QSequence * fCurrentSequence
virtual T * GetObject(QSequence *s)=0
Diana Reconstruction program.