llconnection.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 
00011 #ifndef _GEDDEI_LLCONNECTION_H
00012 #define _GEDDEI_LLCONNECTION_H
00013 
00014 #ifdef __GEDDEI_BUILD
00015 #include "xlconnectionreal.h"
00016 #include "lxconnectionreal.h"
00017 #else
00018 #include <geddei/xlconnectionreal.h>
00019 #include <geddei/lxconnectionreal.h>
00020 #endif
00021 using namespace Geddei;
00022 
00023 namespace Geddei
00024 {
00025 
00026 class Processor;
00027 class Source;
00028 
00037 class LLConnection: public LxConnectionReal, public xLConnectionReal
00038 {
00039  //* Reimplementations from LxConnection
00040  virtual const bool waitUntilReady();
00041  virtual const SignalTypeRef type() { return xLConnectionReal::type(); }
00042  virtual void setType(const SignalType *type);
00043  virtual void resetType();
00044  virtual void sourceStopping();
00045  virtual void sourceStopped();
00046  virtual void reset() {}
00047  virtual BufferData makeScratchElements(const uint elements, bool autoPush);
00048  virtual void pushPlunger();
00049  virtual void startPlungers();
00050  virtual void plungerSent();
00051  virtual void noMorePlungers();
00052  virtual const uint maximumScratchElements(const uint minimum) { while(bufferElementsFree() < minimum) bufferWaitForFree(); return bufferElementsFree(); }
00053  virtual const uint maximumScratchElementsEver() { return theBuffer.size(); }
00054 
00055  //* Reimplementation from xLConnection.
00056  virtual const bool pullType();
00057 
00058  //* Reimplementation from LxConnectionReal.
00059  virtual void bufferWaitForFree();
00060  virtual const uint bufferElementsFree();
00061  virtual void transport(const BufferData &data);
00062 
00063  friend class Processor;
00064  LLConnection(Source *newSource, const uint newSourceIndex, Sink *newSink, const uint newSinkIndex, const uint bufferSize);
00065 };
00066 
00067 };
00068 
00069 #endif

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