MyGUI 3.2.0

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_PluginManager.h
Go to the documentation of this file.
1
6 /*
7 This file is part of MyGUI.
8
9 MyGUI is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 MyGUI is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_PLUGIN_MANAGER_H__
23 #define __MYGUI_PLUGIN_MANAGER_H__
24
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_Singleton.h"
27 #include "MyGUI_Plugin.h"
28 #include "MyGUI_XmlDocument.h"
29 #include "MyGUI_Version.h"
30 #include "MyGUI_DynLib.h"
31 #include <set>
32 #include "MyGUI_BackwardCompatibility.h"
33
34 namespace MyGUI
35 {
36
39 class MYGUI_EXPORT PluginManager :
40 public Singleton<PluginManager>,
41 public MemberObsolete<PluginManager>
42 {
43 public:
44 PluginManager();
45
46 void initialise();
47 void shutdown();
48
50 bool loadPlugin(const std::string& _file);
51
53 void unloadPlugin(const std::string& _file);
54
58 void installPlugin(IPlugin* _plugin);
59
63 void uninstallPlugin(IPlugin* _plugin);
64
66 void unloadAllPlugins();
67
68 private:
69 void _load(xml::ElementPtr _node, const std::string& _file, Version _version);
70
71 private:
73 typedef std::map <std::string, DynLib*> DynLibList;
74
76 typedef std::set <IPlugin*> PluginList;
77
79 DynLibList mLibs;
80
82 PluginList mPlugins;
83
84 bool mIsInitialise;
85 };
86
87 } // namespace MyGUI
88
89 #endif // __MYGUI_PLUGIN_MANAGER_H__
MyGUI_Plugin.h
MyGUI::IPlugin
Base plugin class.
Definition: MyGUI_Plugin.h:33
MyGUI_Prerequest.h
MyGUI_Singleton.h
MyGUI::PluginManager
Plugin manager. Load/unload and register plugins.
Definition: MyGUI_PluginManager.h:39
MyGUI_XmlDocument.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI_BackwardCompatibility.h
MyGUI::xml::Element
Definition: MyGUI_XmlDocument.h:168
MyGUI_Version.h
MyGUI::Version
Definition: MyGUI_Version.h:32
MyGUI_DynLib.h
MyGUI::MemberObsolete
Definition: MyGUI_DeprecatedTypes.h:28
MyGUI::Singleton
Definition: MyGUI_Singleton.h:35