| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "BsPrerequisitesUtil.h"
- #include "BsModule.h"
- namespace BansheeEngine
- {
- /** @addtogroup General
- * @{
- */
- /**
- * This manager keeps a track of all the open dynamic-loading libraries, opens them and returns references to
- * already-open libraries.
- *
- * @note Not thread safe.
- */
- class BS_UTILITY_EXPORT DynLibManager : public Module<DynLibManager>
- {
- public:
- DynLibManager();
- virtual ~DynLibManager();
- /**
- * Loads the given file as a dynamic library.
- *
- * @param[in] name The name of the library. The extension can be omitted.
- */
- DynLib* load(const String& name);
- /** Unloads the given library. */
- void unload(DynLib* lib);
- protected:
- Map<String, DynLib*> mLoadedLibraries;
- };
- /** Easy way of accessing DynLibManager. */
- BS_UTILITY_EXPORT DynLibManager& gDynLibManager();
- /** @} */
- }
|