24#ifndef __DYNAMIC_LIBRARY_LOADER_H__
25#define __DYNAMIC_LIBRARY_LOADER_H__
28#include <Safir/Utilities/Internal/VisibilityHelpers.h>
30#ifdef lluf_utils_EXPORTS
31# define LLUF_UTILS_API SAFIR_HELPER_DLL_EXPORT
33# define LLUF_UTILS_API SAFIR_HELPER_DLL_IMPORT
34# define SAFIR_LIBRARY_NAME "lluf_utils"
35# include <Safir/Utilities/Internal/AutoLink.h>
37#define LLUF_UTILS_LOCAL SAFIR_HELPER_DLL_LOCAL
39#ifndef SAFIR_NO_DEPRECATED
73 void Load(
const std::string& libraryName,
74 const bool unloadOnDestruction,
75 const bool global =
false);
91 void Load(
const std::string& libraryName,
92 const std::string& path,
93 const bool unloadOnDestruction,
94 const bool global =
false);
126 return reinterpret_cast<T*
>(GetFunctionInternal(functionName));
132 void * GetFunctionInternal(
const std::string& functionName);
137 bool m_unloadOnDestruction;
#define LLUF_UTILS_API
Definition DynamicLibraryLoader.h:33
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
This class provides a simple wrapper around dynamic loading functionality of the operating system.
Definition DynamicLibraryLoader.h:53
T * GetFunction(const std::string &functionName)
Find a function in the library.
Definition DynamicLibraryLoader.h:124
void Load(const std::string &libraryName, const bool unloadOnDestruction, const bool global=false)
Load a library.
void Load(const std::string &libraryName, const std::string &path, const bool unloadOnDestruction, const bool global=false)
Load a library from a given location.
void Unload()
Unload the library.
DynamicLibraryLoader()
Constructor.
~DynamicLibraryLoader()
Destructor.