My Project
Public Member Functions | List of all members
Plugin Class Reference

Plugin for loading dynamic libraries. More...

#include <Plugin.h>

Public Member Functions

 Plugin (const std::string filename)
 Constructor. More...
 
 Plugin (const Plugin &plugin)
 Copy constructor. More...
 
Pluginoperator= (const Plugin &plugin)
 Assignment operator. More...
 
 ~Plugin ()
 Destructor.
 
void * resolve (const char *symbol)
 Resolves the address of a symbol. More...
 

Detailed Description

Plugin for loading dynamic libraries.

Plugin class for loading dynamic libraires. The library is loaded during construction and unloaded during destruction.

Definition at line 47 of file Plugin.h.

Constructor & Destructor Documentation

◆ Plugin() [1/2]

Plugin ( const std::string  filename)

Constructor.

Constructing a Plugin object will attempt to load the plugin dynamic library.

Parameters
filenameThe filename of the dynamic library to load.
Exceptions
AlvarExceptionAn exeption is thrown if the library can't be loaded.

◆ Plugin() [2/2]

Plugin ( const Plugin plugin)

Copy constructor.

Parameters
pluginThe Plugin to copy.

Member Function Documentation

◆ operator=()

Plugin& operator= ( const Plugin plugin)

Assignment operator.

Parameters
pluginThe Plugin to copy.

◆ resolve()

void* resolve ( const char *  symbol)

Resolves the address of a symbol.

The symbol must be exported from the library as a C function.

Parameters
symbolThe signature of the symbol.
Returns
The address of the symbol.
Exceptions
AlvarExceptionAn exception is thrown if the symbol is not found.

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