MyGUI_PluginManager.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_PLUGIN_MANAGER_H_
#define MYGUI_PLUGIN_MANAGER_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_Singleton.h"
#include "MyGUI_Plugin.h"
#include "MyGUI_XmlDocument.h"
#include "MyGUI_Version.h"
#include "MyGUI_DynLib.h"
#include <set>
#include "MyGUI_BackwardCompatibility.h"
namespace MyGUI
{
class MYGUI_EXPORT PluginManager : public MemberObsolete<PluginManager>
{
MYGUI_SINGLETON_DECLARATION(PluginManager);
public:
PluginManager();
void initialise();
void shutdown();
bool loadPlugin(std::string_view _file);
void unloadPlugin(std::string_view _file);
void installPlugin(IPlugin* _plugin);
void uninstallPlugin(IPlugin* _plugin);
void unloadAllPlugins();
private:
void _load(xml::ElementPtr _node, std::string_view _file, Version _version);
private:
using DynLibList = std::map<std::string, DynLib*, std::less<>>;
using PluginList = std::set<IPlugin*>;
DynLibList mLibs;
PluginList mPlugins;
bool mIsInitialise{false};
std::string mXmlPluginTagName;
};
} // namespace MyGUI
#endif // MYGUI_PLUGIN_MANAGER_H_
MyGUI_BackwardCompatibility.h
MyGUI_DynLib.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Plugin.h
MyGUI_Prerequest.h
MyGUI_Singleton.h
MYGUI_SINGLETON_DECLARATION
#define MYGUI_SINGLETON_DECLARATION(ClassName)
Definition MyGUI_Singleton.h:112
MyGUI_Version.h
MyGUI_XmlDocument.h
MyGUI::IPlugin
Base plugin class.
Definition MyGUI_Plugin.h:19
MyGUI::MemberObsolete
Definition MyGUI_DeprecatedTypes.h:14
MyGUI::PluginManager::installPlugin
void installPlugin(IPlugin *_plugin)
Definition MyGUI_PluginManager.cpp:136
MyGUI::PluginManager::unloadPlugin
void unloadPlugin(std::string_view _file)
Unload plugin.
Definition MyGUI_PluginManager.cpp:81
MyGUI::PluginManager::uninstallPlugin
void uninstallPlugin(IPlugin *_plugin)
Definition MyGUI_PluginManager.cpp:150
MyGUI::PluginManager::initialise
void initialise()
Definition MyGUI_PluginManager.cpp:25
MyGUI::PluginManager::unloadAllPlugins
void unloadAllPlugins()
Unload all plugins.
Definition MyGUI_PluginManager.cpp:165
MyGUI::PluginManager::loadPlugin
bool loadPlugin(std::string_view _file)
Load plugin.
Definition MyGUI_PluginManager.cpp:49
MyGUI::PluginManager::shutdown
void shutdown()
Definition MyGUI_PluginManager.cpp:37
MyGUI::PluginManager::PluginManager
PluginManager(const PluginManager &)=delete
MyGUI::Version
Definition MyGUI_Version.h:18
MyGUI::xml::ElementPtr
Element * ElementPtr
Definition MyGUI_XmlDocument.h:112
MyGUI
Definition MyGUI_ActionController.h:15