ldas-tools-al  2.6.5
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LDASTools::AL::SOLoader Class Reference

Dynamic library loader. More...

#include <SOLoader.hh>

Public Types

enum  { SOLOADER_MANDITORY, SOLOADER_OPTIONAL }
 
enum  { SOLOADER_MANDITORY, SOLOADER_OPTIONAL }
 
enum  { SOLOADER_MANDITORY, SOLOADER_OPTIONAL }
 
typedef void * symbol_type
 
typedef void(* function_type) (void)
 
typedef void * symbol_type
 
typedef void(* function_type) (void)
 
typedef void * symbol_type
 
typedef void(* function_type) (void)
 

Public Member Functions

 SOLoader (const std::string &Path, const std::string &LibName, int Type=SOLOADER_MANDITORY)
 Constructor. More...
 
 ~SOLoader ()
 Destructor. More...
 
function_type GetFunction (const std::string &Function)
 Retrieve a function from the dynamically loaded library. More...
 
symbol_type GetSymbol (const std::string &Symbol)
 Retrieve a symbol from the dynamically loaded library. More...
 
 SOLoader (const std::string &Path, const std::string &LibName, int Type=SOLOADER_MANDITORY)
 Constructor. More...
 
 ~SOLoader ()
 Destructor. More...
 
function_type GetFunction (const std::string &Function)
 Retrieve a function from the dynamically loaded library. More...
 
symbol_type GetSymbol (const std::string &Symbol)
 Retrieve a symbol from the dynamically loaded library. More...
 
 SOLoader (const std::string &Path, const std::string &LibName, int Type=SOLOADER_MANDITORY)
 Constructor. More...
 
 ~SOLoader ()
 Destructor. More...
 
function_type GetFunction (const std::string &Function)
 Retrieve a function from the dynamically loaded library. More...
 
symbol_type GetSymbol (const std::string &Symbol)
 Retrieve a symbol from the dynamically loaded library. More...
 

Private Types

typedef void * handle_type
 
typedef void * handle_type
 
typedef void * handle_type
 

Private Member Functions

 SOLoader (const SOLoader &Source)
 
const SOLoaderoperator= (const SOLoader &Source)
 
 SOLoader (const SOLoader &Source)
 
const SOLoaderoperator= (const SOLoader &Source)
 
 SOLoader (const SOLoader &Source)
 
const SOLoaderoperator= (const SOLoader &Source)
 

Private Attributes

handle_type m_handle
 

Detailed Description

Dynamic library loader.

This allows for the abstaction of dynamic loading of a library.

Member Typedef Documentation

◆ function_type [1/3]

typedef void( * LDASTools::AL::SOLoader::function_type) (void)

◆ function_type [2/3]

typedef void( * LDASTools::AL::SOLoader::function_type) (void)

◆ function_type [3/3]

typedef void( * LDASTools::AL::SOLoader::function_type) (void)

◆ handle_type [1/3]

typedef void* LDASTools::AL::SOLoader::handle_type
private

◆ handle_type [2/3]

typedef void* LDASTools::AL::SOLoader::handle_type
private

◆ handle_type [3/3]

typedef void* LDASTools::AL::SOLoader::handle_type
private

◆ symbol_type [1/3]

◆ symbol_type [2/3]

◆ symbol_type [3/3]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SOLOADER_MANDITORY 
SOLOADER_OPTIONAL 

◆ anonymous enum

anonymous enum
Enumerator
SOLOADER_MANDITORY 
SOLOADER_OPTIONAL 

◆ anonymous enum

anonymous enum
Enumerator
SOLOADER_MANDITORY 
SOLOADER_OPTIONAL 

Constructor & Destructor Documentation

◆ SOLoader() [1/6]

LDASTools::AL::SOLoader::SOLoader ( const std::string &  Path,
const std::string &  LibName,
int  Type = SOLOADER_MANDITORY 
)

Constructor.

Parameters
[in]PathDirectory containing the dynamic library
[in]LibNameBase name of the library (no standard operating system prefix or suffix)
Returns
new instance of this object

◆ ~SOLoader() [1/3]

LDASTools::AL::SOLoader::~SOLoader ( )

Destructor.

Destroy resources associated with the object

◆ SOLoader() [2/6]

LDASTools::AL::SOLoader::SOLoader ( const SOLoader Source)
private

◆ SOLoader() [3/6]

LDASTools::AL::SOLoader::SOLoader ( const std::string &  Path,
const std::string &  LibName,
int  Type = SOLOADER_MANDITORY 
)

Constructor.

Parameters
[in]PathDirectory containing the dynamic library
[in]LibNameBase name of the library (no standard operating system prefix or suffix)
Returns
new instance of this object

◆ ~SOLoader() [2/3]

LDASTools::AL::SOLoader::~SOLoader ( )

Destructor.

Destroy resources associated with the object

◆ SOLoader() [4/6]

LDASTools::AL::SOLoader::SOLoader ( const SOLoader Source)
private

◆ SOLoader() [5/6]

LDASTools::AL::SOLoader::SOLoader ( const std::string &  Path,
const std::string &  LibName,
int  Type = SOLOADER_MANDITORY 
)

Constructor.

Parameters
[in]PathDirectory containing the dynamic library
[in]LibNameBase name of the library (no standard operating system prefix or suffix)
Returns
new instance of this object

◆ ~SOLoader() [3/3]

LDASTools::AL::SOLoader::~SOLoader ( )

Destructor.

Destroy resources associated with the object

◆ SOLoader() [6/6]

LDASTools::AL::SOLoader::SOLoader ( const SOLoader Source)
private

Member Function Documentation

◆ GetFunction() [1/3]

SOLoader::function_type LDASTools::AL::SOLoader::GetFunction ( const std::string &  Function)

Retrieve a function from the dynamically loaded library.

Parameters
[in]FunctionThe name of the function as it appears in the dynamic library.
Returns
Address of the function

◆ GetFunction() [2/3]

function_type LDASTools::AL::SOLoader::GetFunction ( const std::string &  Function)

Retrieve a function from the dynamically loaded library.

Parameters
[in]FunctionThe name of the function as it appears in the dynamic library.
Returns
Address of the function

◆ GetFunction() [3/3]

function_type LDASTools::AL::SOLoader::GetFunction ( const std::string &  Function)

Retrieve a function from the dynamically loaded library.

Parameters
[in]FunctionThe name of the function as it appears in the dynamic library.
Returns
Address of the function

◆ GetSymbol() [1/3]

SOLoader::symbol_type LDASTools::AL::SOLoader::GetSymbol ( const std::string &  Symbol)

Retrieve a symbol from the dynamically loaded library.

Parameters
[in]SymbolThe name of the symbol as it appears in the dynamic library.
Returns
Address of the symbol

◆ GetSymbol() [2/3]

symbol_type LDASTools::AL::SOLoader::GetSymbol ( const std::string &  Symbol)

Retrieve a symbol from the dynamically loaded library.

Parameters
[in]SymbolThe name of the symbol as it appears in the dynamic library.
Returns
Address of the symbol

◆ GetSymbol() [3/3]

symbol_type LDASTools::AL::SOLoader::GetSymbol ( const std::string &  Symbol)

Retrieve a symbol from the dynamically loaded library.

Parameters
[in]SymbolThe name of the symbol as it appears in the dynamic library.
Returns
Address of the symbol

◆ operator=() [1/3]

const SOLoader& LDASTools::AL::SOLoader::operator= ( const SOLoader Source)
private

◆ operator=() [2/3]

const SOLoader& LDASTools::AL::SOLoader::operator= ( const SOLoader Source)
private

◆ operator=() [3/3]

const SOLoader& LDASTools::AL::SOLoader::operator= ( const SOLoader Source)
private

Member Data Documentation

◆ m_handle

handle_type LDASTools::AL::SOLoader::m_handle
private

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