Geddei::SubProcessorFactory Class Reference
[Geddei's core classes.]

Singleton class for creating SubProcessor objects from plugins. More...

#include <subprocessorfactory.h>

List of all members.

Static Public Member Functions

static const QStringList available ()
static const bool available (const QString &type)
static SubProcessorcreate (const QString &type)
static DomProcessorcreateDom (const QString &type)
static QString version (const QString &type)
static const int versionId (const QString &type)


Detailed Description

Singleton class for creating SubProcessor objects from plugins.

Author:
Gav Wood <gav@cs.york.ac.uk>
The SubProcessorFactory singleton exists in Geddei as the interface to the plugin system. It provides a very simple mechanism for the creation of SubProcessor-derived classes that are non-existant, unknown or otherwise unavailable at compile time.

The fact that it embodies a singleton is hidden behind the API. The only methods available to the developer are static.

Typical usage requires a program to first check if a given class is available with available(), then perhaps to check the version provided with version (). Having ascertained that the correct class is available a DomProcessor object whose primary SubProcessor is an object of the given type may be instantiated with createDom().


Member Function Documentation

static const QStringList Geddei::SubProcessorFactory::available (  )  [inline, static]

Retrieves a list of the types of SubProcessor available for creation.

Returns:
A complete list of names of SubProcessor-derived classes that will cause available to return true when each is used as the parameter.

const bool Geddei::SubProcessorFactory::available ( const QString &  type  )  [static]

Queries availablity of a SubProcessor type.

Parameters:
type The type of SubProcessor (i.e. class name) to be queried.
Returns:
true if it can be create() -ed, false otherwise.

SubProcessor * Geddei::SubProcessorFactory::create ( const QString &  type  )  [static]

Creates a SubProcessor object of type type.

Returns:
A newly instantiated object of class type , or 0 if type is not available.

DomProcessor * Geddei::SubProcessorFactory::createDom ( const QString &  type  )  [static]

Creates a DomProcessor object, whose primary is a SubProcessor of type type.

Returns:
A newly instantiated DomProcessor object, or 0 if type is not available.

static QString Geddei::SubProcessorFactory::version ( const QString &  type  )  [inline, static]

Gets (latest available) version of a SubProcessor -derived class.

Parameters:
type The type of SubProcessor (i.e. class name) to be queried.
Returns:
The version of the class type that is available, or -1 if unavailable, given in a proper string representation.

const int Geddei::SubProcessorFactory::versionId ( const QString &  type  )  [static]

Gets (latest available) version of a SubProcessor -derived class.

Parameters:
type The type of SubProcessor (i.e. class name) to be queried.
Returns:
The version of the class type that is available, or -1 if unavailable, given in the integer code representation.


The documentation for this class was generated from the following files:
Generated on Fri Nov 10 21:58:38 2006 for Exscalibar by  doxygen 1.5.1