#include <processorfactory.h>
Static Public Member Functions | |
static const QStringList | available () |
static const bool | available (const QString &type) |
static Processor * | create (const QString &type) |
static QString | version (const QString &type) |
static const int | versionId (const QString &type) |
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().
static const QStringList Geddei::ProcessorFactory::available | ( | ) | [inline, static] |
Retrieves a list of the types of Processor available for creation.
static const bool Geddei::ProcessorFactory::available | ( | const QString & | type | ) | [inline, static] |
Processor * Geddei::ProcessorFactory::create | ( | const QString & | type | ) | [static] |
Creates a Processor object of type type.
static QString Geddei::ProcessorFactory::version | ( | const QString & | type | ) | [inline, static] |
static const int Geddei::ProcessorFactory::versionId | ( | const QString & | type | ) | [inline, static] |