processorgroup.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_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

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