Drive Engine
1.0.0
Plateforme de reconstruction 3D
|
Manager to load dynamically functions from external dynamic libraries. More...
#include <DynamicLibraryManager.h>
Public Member Functions | |
const DynamicLibraryRecord | Open (const std::string &path) |
Opens a dynamic library. More... | |
void * | Load (const std::string &functionName, const DynamicLibraryRecord &record) |
Loads a function from a dynamic library. More... | |
void | Close (const DynamicLibraryRecord &recordIdentifier) |
Closes a previously opened dynamic library. More... | |
Static Public Member Functions | |
static DynamicLibraryManager & | GetInstance () |
Manager to load dynamically functions from external dynamic libraries.
It's a singleton. Only one manager is allowed.
void DriveEngine::DynamicLibraryManager::Close | ( | const DynamicLibraryRecord & | recordIdentifier | ) |
Closes a previously opened dynamic library.
Exception safety : Strong exception safety. This member function throws exceptions.
recordIdentifier | The dynamic library record. |
void* DriveEngine::DynamicLibraryManager::Load | ( | const std::string & | functionName, |
const DynamicLibraryRecord & | record | ||
) |
Loads a function from a dynamic library.
If the manager is not able to load the function, an exception is thrown.
Exception safety : Strong exception safety. This member function throws exceptions.
functionName | Name of the function. It's the name of the symbol. If the name is null, an exception is thrown. |
record | The dynamic library record. If the record is null, an exception is thrown. |
const DynamicLibraryRecord DriveEngine::DynamicLibraryManager::Open | ( | const std::string & | path | ) |
Opens a dynamic library.
The dynamic library is dynamically loaded into memory. It is necessary to be able to use its functions.
If the manager is not able to open the library, an exception is thrown.
There is no need to close manually opened library. They will be closed at the manager destruction.
Exception safety : Strong exception safety. This member function throws exceptions.
path | Full pathname of the library. If the path is null, an exception is thrown. |