MyGUI_DynLibManager.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_DYN_LIB_MANAGER_H_
#define MYGUI_DYN_LIB_MANAGER_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_Singleton.h"
#include "MyGUI_DynLib.h"
#include <map>
namespace MyGUI
{
class MYGUI_EXPORT DynLibManager
{
MYGUI_SINGLETON_DECLARATION(DynLibManager);
public:
DynLibManager();
void initialise();
void shutdown();
DynLib* load(std::string_view fileName);
void unload(DynLib* library);
void unloadAll();
/*internal:*/
void _unloadDelayDynLibs();
private:
void notifyEventFrameStart(float _time);
private:
using StringDynLibMap = std::map<std::string, DynLib*, std::less<>>;
StringDynLibMap mLibsMap;
bool mIsInitialise{false};
using VectorDynLib = std::vector<DynLib*>;
VectorDynLib mDelayDynLib;
};
} // namespace MyGUI
#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