31 lines
578 B
C
31 lines
578 B
C
|
|
#ifndef PLUGINREGISTER_H
|
|||
|
|
#define PLUGINREGISTER_H
|
|||
|
|
|
|||
|
|
#include <memory>
|
|||
|
|
#include <map>
|
|||
|
|
#include <mutex>
|
|||
|
|
#include <QString>
|
|||
|
|
|
|||
|
|
class QAction;
|
|||
|
|
class PluginModule;
|
|||
|
|
|
|||
|
|
class PluginRegister {
|
|||
|
|
public:
|
|||
|
|
using PluginModuleSPtr = std::shared_ptr<PluginModule>;
|
|||
|
|
using ModuleMap = std::map<QString, PluginModuleSPtr>;
|
|||
|
|
|
|||
|
|
static PluginRegister* getInstance();
|
|||
|
|
|
|||
|
|
PluginRegister();
|
|||
|
|
void registerModule(PluginModuleSPtr module);
|
|||
|
|
const ModuleMap& modules() const { return m_moduleMap; }
|
|||
|
|
private:
|
|||
|
|
|
|||
|
|
ModuleMap m_moduleMap;
|
|||
|
|
|
|||
|
|
static PluginRegister* s_pluginRegister;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif // PLUGINREGISTER_H
|