RTXI  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Plugin::Manager Class Reference

#include <plugin.h>

Inheritance diagram for Plugin::Manager:

Public Slots

void customEvent (QEvent *)
 

Public Member Functions

Objectload (const QString &library)
 
void unload (Object *object)
 
void unloadAll (void)
 
void foreachPlugin (void(*callback)(Plugin::Object *, void *), void *param)
 

Static Public Member Functions

static ManagergetInstance (void)
 

Private Member Functions

 Manager (void)
 
 ~Manager (void)
 
 Manager (const Manager &)
 
Manageroperator= (const Manager &)
 
void insertPlugin (Object *)
 
void removePlugin (Object *)
 

Private Attributes

Mutex mutex
 
std::list< Object * > pluginList
 

Static Private Attributes

static Managerinstance = 0
 

Friends

class Object
 

Detailed Description

Provides mechanisms for the loading and unloading of a Plugin::Object

Definition at line 57 of file plugin.h.

Constructor & Destructor Documentation

Plugin::Manager::Manager(void )
inlineprivate

Definition at line 122 of file plugin.h.

Plugin::Manager::~Manager(void )
inlineprivate

Definition at line 123 of file plugin.h.

Plugin::Manager::Manager(const Manager)
inlineprivate

Definition at line 124 of file plugin.h.

Member Function Documentation

void Plugin::Manager::customEvent(QEvent * e)
slot

Definition at line 162 of file plugin.cpp.

void Plugin::Manager::foreachPlugin(void(*)(Plugin::Object *, void *) callback,
void * param 
)

Loop through each Plugin and execute a callback. The callback takes two parameters, a Plugin pointer and param, the second parameter to foreachPlugin.

Parameters
callbackThe callback function.
paramA parameter to the callback function.
See also
Plugin::Object

Definition at line 131 of file plugin.cpp.

Plugin::Manager * Plugin::Manager::getInstance(void )
static

Manager is a Singleton, which means that there can only be one instance. This function returns a pointer to that single instance.

Returns
The instance of Manager.

Definition at line 186 of file plugin.cpp.

void Plugin::Manager::insertPlugin(Plugin::Objectplugin)
private

Definition at line 138 of file plugin.cpp.

Plugin::Object * Plugin::Manager::load(const QString & library)

Function for loading a Plugin::Object from a shared library file.

Parameters
libraryThe file name of a shared library.
Returns
A pointer to the newly created Plugin::Object.
See also
Plugin::Object

Definition at line 46 of file plugin.cpp.

Manager& Plugin::Manager::operator=(const Manager)
inlineprivate

Definition at line 125 of file plugin.h.

void Plugin::Manager::removePlugin(Plugin::Objectplugin)
private

Definition at line 150 of file plugin.cpp.

void Plugin::Manager::unload(Plugin::Objectplugin)

Function for unloading a single Plugin::Object in the system.

Parameters
objectThe plugin object to be unloaded.

Definition at line 99 of file plugin.cpp.

void Plugin::Manager::unloadAll(void )

Function for unloading all Plugin::Object's in the system.

Definition at line 116 of file plugin.cpp.

Friends And Related Function Documentation

friend class Object
friend

Definition at line 62 of file plugin.h.

Member Data Documentation

Plugin::Manager * Plugin::Manager::instance = 0
staticprivate

Definition at line 128 of file plugin.h.

Mutex Plugin::Manager::mutex
private

Definition at line 137 of file plugin.h.

std::list<Object *> Plugin::Manager::pluginList
private

Definition at line 138 of file plugin.h.


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