multisink.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_MULTISINK_H
00012 #define _GEDDEI_MULTISINK_H
00013 
00014 #include "qvaluelist.h"
00015 
00016 #ifdef __GEDDEI_BUILD
00017 #include "multiplicative.h"
00018 #include "processorport.h"
00019 #else
00020 #include <geddei/multiplicative.h>
00021 #include <geddei/processorport.h>
00022 #endif
00023 using namespace Geddei;
00024 
00025 namespace Geddei
00026 {
00027 
00028 class MultiSource;
00029 
00035 class MultiSink: virtual public Multiplicative
00036 {
00037  //* (Reverse) connection deferral mechanism
00038  QValueList<MultiSource *> theDeferrals;
00039 
00040  //* Reimplementations from Multiplicative
00041  virtual void setSinkMultiplicity(const uint multiplicity);
00042 
00043  //* Neccessary so MultiSource can use append-/remove-Deferral
00044  friend class MultiSource;
00045 
00051  void appendDeferral(MultiSource *o) { theDeferrals.append(o); }
00052 
00058  void removeDeferral(MultiSource *o) { theDeferrals.remove(o); }
00059 
00060 public:
00064  virtual ProcessorPort sinkPort(const uint i) = 0;
00065 };
00066 
00067 };
00068 
00069 #endif

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