subprocessorfactory.h

00001 /***************************************************************************
00002  *   Copyright (C) 2003 by Gav Wood                                        *
00003  *   gav@cs.york.ac.uk                                                     *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Library General Public License as       *
00007  *   published by the Free Software Foundation; either version 2 of the    *
00008  *   License, or (at your option) any later version.                       *
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

Generated on Fri Nov 10 21:58:26 2006 for Exscalibar by  doxygen 1.5.1