pgLab/pglab/plugin_support/PluginRegister.h
eelke 15bee33076 Made step to remove ASyncWindow in favour of usage of Future and FutureWatcher.
This should allow concurrency in the plugins to be independent from their container.

Contains also some work on the system for registering plugins.
2018-12-30 15:46:15 +01:00

30 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