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

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

#include <processorfactory.h>

List of all members.

Static Public Member Functions

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


Detailed Description

Singleton class for creating Processor objects from plugins.

Author:
Gav Wood <gav@cs.york.ac.uk>
The ProcessorFactory singleton exists in Geddei as the interface to the plugin system. It provides a very simple mechanism for the creation of Processor-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 an object may be instantiated with create().


Member Function Documentation

static const bool Geddei::ProcessorFactory::available ( const QString &  type  )  [inline, static]

Queries availablity of a Processor type.

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

static const int Geddei::ProcessorFactory::versionId ( const QString &  type  )  [inline, static]

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

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

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

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

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

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

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

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

Processor * Geddei::ProcessorFactory::create ( const QString &  type  )  [static]

Creates a Processor object of type type.

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


The documentation for this class was generated from the following files:
Generated on Thu Jul 13 06:56:42 2006 for Exscalibar by  doxygen 1.4.7