Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

P::PluginFactoryImpl Class Reference
[Core library]

Plugin factory implementation class. More...

#include <pplugin.h>

Inheritance diagram for P::PluginFactoryImpl:

P::PluginFactory< Iface > List of all members.

Public Member Functions

 PluginFactoryImpl (const char *iface)
virtual ~PluginFactoryImpl ()
void addPlugin (const char *path) throw (SystemError)
 Load a plugin library.

void addPluginDir (const char *path) throw (SystemError, IOError)
 Try loading plugin libraries found in directory.

PluginBasecreate (const char *feature)
 Create instance of plugin object.

void destroy (PluginBase *inst)
 Destroy instance of plugin object.

bool provides (const char *feature) const
 Checks if the factory provides a plugin with given feature.


Detailed Description

Plugin factory implementation class.

The Plugin factory is used to load shared libraries which export plugin objects for a given interface (class). The factory will only load shared libraries which export features for the interface given in the constructor, others will be silently ignored. Using the feature as an identifier you can create instances of dynamically loaded objects. Please use the PluginFactory template class which avoids typecasts.

Author:
Christian Prochnow <cproch@seculogix.de>

Definition at line 83 of file pplugin.h.


Constructor & Destructor Documentation

P::PluginFactoryImpl::PluginFactoryImpl const char *  iface  ) 
 

virtual P::PluginFactoryImpl::~PluginFactoryImpl  )  [virtual]
 


Member Function Documentation

void P::PluginFactoryImpl::addPlugin const char *  path  )  throw (SystemError)
 

Load a plugin library.

void P::PluginFactoryImpl::addPluginDir const char *  path  )  throw (SystemError, IOError)
 

Try loading plugin libraries found in directory.

PluginBase* P::PluginFactoryImpl::create const char *  feature  ) 
 

Create instance of plugin object.

Reimplemented in P::PluginFactory< Iface >.

void P::PluginFactoryImpl::destroy PluginBase inst  ) 
 

Destroy instance of plugin object.

bool P::PluginFactoryImpl::provides const char *  feature  )  const
 

Checks if the factory provides a plugin with given feature.


The documentation for this class was generated from the following file:
Generated on Fri Mar 12 21:08:35 2004 for P::Classes by doxygen 1.3.3