GNU CommonC++
Public Member Functions | Static Public Member Functions | List of all members
ost::DSO Class Reference

The DSO dynamic loader class is used to load object files. More...

#include <file.h>

Public Member Functions

 DSO (const char *filename)
 Construct and load a DSO object file. More...
 
 DSO (const char *filename, bool resolve)
 
const char * getError (void)
 Retrieve error indicator associated with DSO failure. More...
 
virtual ~DSO ()
 Detach a DSO object from running memory. More...
 
void * operator[] (const char *sym)
 Lookup a symbol in the loaded file. More...
 
bool isValid (void)
 See if DSO object is valid. More...
 

Static Public Member Functions

static void dynunload (void)
 
static DSOgetObject (const char *name)
 Find a specific DSO object by filename. More...
 
static void setDebug (void)
 Install debug handler... More...
 

Detailed Description

The DSO dynamic loader class is used to load object files.

On elf based systems this is typically done with dlopen. A dummy stub class is generated for non-dl capable systems.

Author
David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m Dynamic class file loader.

Constructor & Destructor Documentation

◆ DSO() [1/2]

ost::DSO::DSO ( const char *  filename)
inline

Construct and load a DSO object file.

Parameters
filenamepathname of object file to load.

◆ DSO() [2/2]

ost::DSO::DSO ( const char *  filename,
bool  resolve 
)
inline

◆ ~DSO()

virtual ost::DSO::~DSO ( )
virtual

Detach a DSO object from running memory.

Member Function Documentation

◆ dynunload()

static void ost::DSO::dynunload ( void  )
static

◆ getError()

const char* ost::DSO::getError ( void  )
inline

Retrieve error indicator associated with DSO failure.

This is often used in catch handlers.

References __EXPORT.

◆ getObject()

static DSO* ost::DSO::getObject ( const char *  name)
static

Find a specific DSO object by filename.

Parameters
nameof DSO object file (partial).

◆ isValid()

bool ost::DSO::isValid ( void  )

See if DSO object is valid.

Returns
true if valid.

◆ operator[]()

void* ost::DSO::operator[] ( const char *  sym)

Lookup a symbol in the loaded file.

◆ setDebug()

static void ost::DSO::setDebug ( void  )
static

Install debug handler...


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