00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _GEDDEI_PROCESSORGROUP_H
00011 #define _GEDDEI_PROCESSORGROUP_H
00012
00013 #include <qstring.h>
00014 #include <qmap.h>
00015
00016 #ifdef __GEDDEI_BUILD
00017 #include "processor.h"
00018 #else
00019 #include <geddei/processor.h>
00020 #endif
00021
00022 namespace Geddei
00023 {
00024
00025 class Processor;
00026 class DomProcessor;
00027
00039 class ProcessorGroup
00040 {
00041 bool theAdopt;
00042 QMap<QString, Processor *> theProcessors;
00043
00044 friend class Processor;
00045 void add(Processor *o);
00046 void remove(Processor *o);
00047
00048 public:
00055 const bool confirmTypes() const;
00056
00070 const bool go(const bool waitUntilGoing = true) const;
00071
00082 const Processor::ErrorType waitUntilGoing(Processor **errorProc = 0, int *errorData = 0) const;
00083
00092 void stop(const bool resetToo = true) const;
00093
00099 void reset() const;
00100
00104 void deleteAll();
00105
00113 void disconnectAll();
00114
00121 const bool exists(const QString &name);
00122
00129 Processor &get(const QString &name);
00130
00138 DomProcessor &dom(const QString &name);
00139
00147 Processor &operator[](const QString &name) { return get(name); }
00148
00154 const uint count() const { return theProcessors.count(); }
00155
00162 ProcessorGroup(const bool adopt = false);
00163
00167 ~ProcessorGroup();
00168 };
00169
00170 }
00171
00172 #endif