MyGUI: MyGUI_DynLibManager.h Source File

MyGUI 3.4.3

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
15namespace MyGUI
16{
17
20 class MYGUI_EXPORT DynLibManager
21 {
22 MYGUI_SINGLETON_DECLARATION(DynLibManager);
23
24 public:
25 DynLibManager();
26
27 void initialise();
28 void shutdown();
29
31 DynLib* load(std::string_view fileName);
33 void unload(DynLib* library);
34
35 void unloadAll();
36
37 /*internal:*/
38 void _unloadDelayDynLibs();
39
40 private:
41 void notifyEventFrameStart(float _time);
42
43 private:
45 using StringDynLibMap = std::map<std::string, DynLib*, std::less<>>;
47 StringDynLibMap mLibsMap;
48
49 bool mIsInitialise{false};
50
51 using VectorDynLib = std::vector<DynLib*>;
52 VectorDynLib mDelayDynLib;
53 };
54
55} // namespace MyGUI
56
57#endif // MYGUI_DYN_LIB_MANAGER_H_
MyGUI_DynLib.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI_Singleton.h
MYGUI_SINGLETON_DECLARATION
#define MYGUI_SINGLETON_DECLARATION(ClassName)
Definition MyGUI_Singleton.h:112
MyGUI::DynLib
Resource holding data about a dynamic library.
Definition MyGUI_DynLib.h:35
MyGUI::DynLibManager::initialise
void initialise()
Definition MyGUI_DynLibManager.cpp:22
MyGUI::DynLibManager::_unloadDelayDynLibs
void _unloadDelayDynLibs()
Definition MyGUI_DynLibManager.cpp:93
MyGUI::DynLibManager::unload
void unload(DynLib *library)
Unload library.
Definition MyGUI_DynLibManager.cpp:67
MyGUI::DynLibManager::unloadAll
void unloadAll()
Definition MyGUI_DynLibManager.cpp:77
MyGUI::DynLibManager::DynLibManager
DynLibManager(const DynLibManager &)=delete
MyGUI::DynLibManager::load
DynLib * load(std::string_view fileName)
Load library.
Definition MyGUI_DynLibManager.cpp:47
MyGUI::DynLibManager::shutdown
void shutdown()
Definition MyGUI_DynLibManager.cpp:33
MyGUI
Definition MyGUI_ActionController.h:15