localprocessor.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 RGEDDEILOCALPROCESSOR_H
00011 #define RGEDDEILOCALPROCESSOR_H
00012 
00013 #include <qstring.h>
00014 
00015 #ifdef __GEDDEI_BUILD
00016 #include "processor.h"
00017 #include "abstractprocessor.h"
00018 #include "abstractprocessorgroup.h"
00019 #else
00020 #include <geddei/processor.h>
00021 #include <rgeddei/abstractprocessor.h>
00022 #include <rgeddei/abstractprocessorgroup.h>
00023 #endif
00024 using namespace Geddei;
00025 using namespace rGeddei;
00026 
00027 namespace rGeddei
00028 {
00029 
00046 class LocalProcessor : virtual public AbstractProcessor
00047 {
00048  friend class AbstractProcessor;
00049  friend class LocalSession;
00050  friend class RemoteProcessor;
00051  friend class LocalDomProcessor;
00052  friend class RemoteDomProcessor;
00053 
00072  LocalProcessor(LocalSession &session, Processor *processor);
00073 
00102  LocalProcessor(LocalSession &session, Processor &processor);
00103 
00114  LocalProcessor(LocalSession &session, const QString &type);
00115 
00116 protected:
00118  LocalSession *theSession;
00120  Processor *theProcessor;
00122  bool theAdopted;
00123 
00124  //* Reimplementations from AbstractProcessor.
00125 private:
00126  virtual void doInit(const QString &name, AbstractProcessorGroup *g, const Properties &p);
00127 public:
00128  virtual const bool go() { return theProcessor->go(); }
00129  virtual const Processor::ErrorType waitUntilGoing(int *errorData = 0) { return theProcessor->waitUntilGoing(errorData); }
00130  virtual void waitUntilDone() { theProcessor->waitUntilDone(); }
00131  virtual void stop() { theProcessor->stop(); }
00132  virtual void reset() { theProcessor->reset(); }
00133  virtual void share(const uint sourceIndex) { theProcessor->share(sourceIndex); }
00134  virtual void split(const uint sourceIndex) { theProcessor->split(sourceIndex); }
00135  virtual const bool connect(const uint sourceIndex, const RemoteProcessor *sink, const uint sinkIndex, const uint bufferSize = 1);
00136  virtual const bool connect(const uint sourceIndex, const LocalProcessor *sink, const uint sinkIndex, const uint bufferSize = 1);
00137  virtual void disconnect(const uint sourceIndex);
00138  virtual void disconnectAll();
00139  virtual const QString name() const { return theProcessor->name(); }
00140 
00144  virtual ~LocalProcessor();
00145 };
00146 
00147 };
00148 
00149 #endif

Generated on Thu Jul 13 06:56:33 2006 for Exscalibar by  doxygen 1.4.7