CDLLoader Class Reference

Portabe Dynamic Link Library Loader. More...

#include <mia/core/dlloader.hh>

Public Member Functions

 CDLLoader (const char *name, int flags)
 
void * get_function (const char *name) const
 
const std::string & get_name () const
 
void set_keep_library ()
 
void set_unload_library ()
 tell the loader that the library should be unloaded at destruction More...
 
 ~CDLLoader ()
 

Detailed Description

Portabe Dynamic Link Library Loader.

This class provides a portable way to load dynamic link libraries.

Remarks
This class doesn't release the loaded library when it is destroyed.

Definition at line 36 of file dlloader.hh.

Constructor & Destructor Documentation

◆ CDLLoader()

CDLLoader::CDLLoader ( const char *  name,
int  flags 
)

Constructor that loads the DLL. If the Library name is not found, the constructor will throw a std::runtime_error .

Parameters
namename of the library
flagsflags used during loading (only used in UNIX)

◆ ~CDLLoader()

CDLLoader::~CDLLoader ( )

Destructor; currently it does nothing (should unload the library), but currently it is not ensured that the code is not referenced from some plug-in.

Member Function Documentation

◆ get_function()

void* CDLLoader::get_function ( const char *  name) const

Get a function address based on its name

Parameters
nameof the function to look up
Returns
pointer to the function or 0

◆ get_name()

const std::string& CDLLoader::get_name ( ) const
Returns
the module name

◆ set_keep_library()

void CDLLoader::set_keep_library ( )

◆ set_unload_library()

void CDLLoader::set_unload_library ( )

tell the loader that the library should be unloaded at destruction


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