InspIRCd  3.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
DLLManager Class Reference

#include <dynamic.h>

Inheritance diagram for DLLManager:
classbase

Public Member Functions

 DLLManager (const char *fname)
 
const std::string & LastError ()
 
ModuleCallInit ()
 
void * GetSymbol (const char *name)
 
std::string GetVersion ()
 
- Public Member Functions inherited from classbase
virtual CullResult cull ()
 

Public Attributes

void * h
 

Protected Member Functions

void RetrieveLastError ()
 

Protected Attributes

std::string err
 

Detailed Description

The DLLManager class is able to load a module file by filename, and locate its init_module symbol.

Constructor & Destructor Documentation

◆ DLLManager()

DLLManager::DLLManager ( const char *  fname)

This constructor loads the module using dlopen()

Parameters
fnameThe filename to load. This should be within the modules dir.

Member Function Documentation

◆ CallInit()

Module * DLLManager::CallInit ( )

Return a module by calling the init function

◆ GetSymbol()

void * DLLManager::GetSymbol ( const char *  name)

Retrieves the value of the specified symbol.

Parameters
nameThe name of the symbol to retrieve.
Returns
Either the value of the specified symbol or or NULL if it does not exist.

◆ GetVersion()

std::string DLLManager::GetVersion ( )

Get detailed version information from the module file

◆ LastError()

const std::string& DLLManager::LastError ( )
inline

Get the last error from dlopen() or dlsym().

◆ RetrieveLastError()

void DLLManager::RetrieveLastError ( )
protected

Sets the last error string

Member Data Documentation

◆ err

std::string DLLManager::err
protected

The last error string

◆ h

void* DLLManager::h

The module library handle.


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