00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _GEDDEI_SUBPROCESSORFACTORY_H
00011 #define _GEDDEI_SUBPROCESSORFACTORY_H
00012
00013 #ifdef __GEDDEI_BUILD
00014 #include "subprocessor.h"
00015 #include "qfactorymanager.h"
00016 #else
00017 #include <geddei/subprocessor.h>
00018 #include <qtextra/qfactorymanager.h>
00019 #endif
00020 using namespace Geddei;
00021
00022 namespace Geddei
00023 {
00024
00025 class DomProcessor;
00026
00045 class SubProcessorFactory
00046 {
00047 static QFactoryManager<SubProcessor> *theOne;
00048 static QFactoryManager<SubProcessor> &factory();
00049
00050 public:
00057 static const bool available(const QString &type);
00058
00066 static const int versionId(const QString &type);
00067
00075 static QString version(const QString &type) { return QString::number(versionId(type) / 65536) + "." + QString::number((versionId(type) / 256) % 256) + "." + QString::number(versionId(type) % 256); }
00076
00083 static const QStringList available() { return factory().getAvailable(); }
00084
00091 static SubProcessor *create(const QString &type);
00092
00100 static DomProcessor *createDom(const QString &type);
00101 };
00102
00103 };
00104
00105 #endif