MyGUI  3.2.1
MyGUI_DynLibManager.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_DYN_LIB_MANAGER_H__
8 #define __MYGUI_DYN_LIB_MANAGER_H__
9 
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_Singleton.h"
12 #include "MyGUI_DynLib.h"
13 #include <map>
14 
15 namespace MyGUI
16 {
17 
21  public Singleton<DynLibManager>
22  {
23  public:
24  DynLibManager();
25 
26  void initialise();
27  void shutdown();
28 
30  DynLib* load(const std::string& fileName);
32  void unload(DynLib* library);
33 
34  void unloadAll();
35 
36  /*internal:*/
37  void _unloadDelayDynLibs();
38 
39  private:
40  void notifyEventFrameStart(float _time);
41 
42  private:
44  typedef std::map <std::string, DynLib*> StringDynLibMap;
46  StringDynLibMap mLibsMap;
47 
48  bool mIsInitialise;
49 
50  typedef std::vector<DynLib*> VectorDynLib;
51  VectorDynLib mDelayDynLib;
52  };
53 
54 } // namespace MyGUI
55 
56 #endif // __MYGUI_DYN_LIB_MANAGER_H__