MyGUI: MyGUI_PluginManager.h Source File

MyGUI 3.2.2

MyGUI_PluginManager.h
Go to the documentation of this file.
1 /*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7 #ifndef MYGUI_PLUGIN_MANAGER_H_
8 #define MYGUI_PLUGIN_MANAGER_H_
9
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_Singleton.h"
12 #include "MyGUI_Plugin.h"
13 #include "MyGUI_XmlDocument.h"
14 #include "MyGUI_Version.h"
15 #include "MyGUI_DynLib.h"
16 #include <set>
17 #include "MyGUI_BackwardCompatibility.h"
18
19 namespace MyGUI
20 {
21
24 class MYGUI_EXPORT PluginManager :
25 public Singleton<PluginManager>,
26 public MemberObsolete<PluginManager>
27 {
28 public:
29 PluginManager();
30
31 void initialise();
32 void shutdown();
33
35 bool loadPlugin(const std::string& _file);
36
38 void unloadPlugin(const std::string& _file);
39
43 void installPlugin(IPlugin* _plugin);
44
48 void uninstallPlugin(IPlugin* _plugin);
49
51 void unloadAllPlugins();
52
53 private:
54 void _load(xml::ElementPtr _node, const std::string& _file, Version _version);
55
56 private:
58 typedef std::map <std::string, DynLib*> DynLibList;
59
61 typedef std::set <IPlugin*> PluginList;
62
64 DynLibList mLibs;
65
67 PluginList mPlugins;
68
69 bool mIsInitialise;
70 std::string mXmlPluginTagName;
71 };
72
73 } // namespace MyGUI
74
75 #endif // MYGUI_PLUGIN_MANAGER_H_
MyGUI_XmlDocument.h
MyGUI_Version.h
MyGUI::PluginManager
Plugin manager. Load/unload and register plugins.
Definition: MyGUI_PluginManager.h:24
MyGUI::xml::Element
Definition: MyGUI_XmlDocument.h:158
MyGUI::Version
Definition: MyGUI_Version.h:17
MyGUI_Prerequest.h
MyGUI_Singleton.h
MyGUI_Plugin.h
MyGUI::IPlugin
Base plugin class.
Definition: MyGUI_Plugin.h:18
MyGUI::MemberObsolete
Definition: MyGUI_DeprecatedTypes.h:13
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI::Singleton
Definition: MyGUI_Singleton.h:20
MyGUI_BackwardCompatibility.h
MyGUI
Definition: MyGUI_ActionController.h:14
MyGUI_DynLib.h