#ifndef REGISTRY_H #define REGISTRY_H #include #include #include "DoricExport.h" #include "utils/DoricObjectFactory.h" class DoricLibrary; class DORIC_EXPORT DoricRegistry { private: static DoricRegistry *local_instance; ~DoricRegistry() { qDebug() << "DoricRegistry destructor"; } public: static DoricRegistry *getInstance() { static DoricRegistry instance; return &instance; } QSet doricLibraries; DoricObjectFactory plugins; DoricObjectFactory nodes; DoricRegistry(); template void registerNativePlugin(QString name) { plugins.registerClass(name); } template void registerViewNode(QString name) { nodes.registerClass(name); } bool acquirePluginInfo(QString name); bool acquireNodeInfo(QString name); void registerLibrary(DoricLibrary *doricLibrary); }; #endif // REGISTRY_H