VICI
0.11.815
Visual Chart Interpreter
|
Manages an instance of a dynamically loaded shared library. More...
#include <vici/plugin.h>
Public Types | |
enum | Mode { AutoRun, OnDemand, StayResident } |
Control lifetime of the library. More... | |
Public Member Functions | |
PlugInLib (const Path &libPath) | |
Constructor. More... | |
~PlugInLib () | |
Destructor. | |
void | setMode (Mode m) |
Set the lifetime for a plug-in. More... | |
Mode | getMode () |
Get the mode for the entire library. More... | |
bool | loaded () |
Check if successfully loaded the library. More... | |
void | startUsage () |
Indicate that the library is being used. | |
void | endUsage () |
Advise that a plug-in is no longer using the library. | |
bool | inUse () |
Test if the library is in use. More... | |
const VICI::Path & | getPath () |
Get the path to the library. More... | |
Manages an instance of a dynamically loaded shared library.
This object is responsible for loading and unloading the library. It is also responsible for calling the initialisation and finalisation code within the library using the two extern "C" functions.
Note that a library may have more than one plug-in class defined, and these may even have different lifetimes.
PlugInLib::PlugInLib | ( | const Path & | libPath | ) |
Constructor.
libPath | The path to the shared library, from xini config |
|
inline |
Get the mode for the entire library.
|
inline |
Get the path to the library.
|
inline |
Test if the library is in use.
bool PlugInLib::loaded | ( | ) |
Check if successfully loaded the library.
void PlugInLib::setMode | ( | Mode | m | ) |
Set the lifetime for a plug-in.
This value is combined with the existing values to get a lifetime value for the overall library
m | The mode for the plug-in |