Drive Engine  1.0.0
Plateforme de reconstruction 3D
DriveEngine::DynamicLibraryManager Class Referencefinal

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 DynamicLibraryManagerGetInstance ()
 

Detailed Description

Manager to load dynamically functions from external dynamic libraries.

It's a singleton. Only one manager is allowed.

Member Function Documentation

void DriveEngine::DynamicLibraryManager::Close ( const DynamicLibraryRecord recordIdentifier)

Closes a previously opened dynamic library.

Exception safety : Strong exception safety. This member function throws exceptions.

Parameters
recordIdentifierThe 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.

Parameters
functionNameName of the function. It's the name of the symbol. If the name is null, an exception is thrown.
recordThe dynamic library record. If the record is null, an exception is thrown.
Returns
A pointer to the function. If an error occur, returns null.
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.

Parameters
pathFull pathname of the library. If the path is null, an exception is thrown.
Returns
A dynamic library record. If an error occur, returns null.

The documentation for this class was generated from the following files: