00001 /*-------------------------------------------------------------------- 00002 * 00003 * (C) Copyright Koninklijke Philips Electronics NV 2006. 00004 * All rights reserved. This software is licensed under the terms of 00005 * version 2.1 of the GNU Lesser General Public License as published 00006 * by the Free Software Foundation. For licensing and warranty 00007 * information, see the file COPYING in the main directory. 00008 * 00009 *------------------------------------------------------------------*/ 00010 00011 #ifndef RTEFIFO_H 00012 #define RTEFIFO_H 00013 00014 class FifoImpl; 00015 class rteInPort; 00016 class rteOutPort; 00017 00018 class rteFifo 00019 { 00020 public: 00021 rteFifo(FifoImpl& f); 00022 virtual ~rteFifo(); 00023 00024 virtual void read(void* p, unsigned int nitems) = 0; 00025 virtual void write(const void* p, unsigned int nitems) = 0; 00026 00027 const FifoImpl* api() const; 00028 const rteInPort* getDst() const; 00029 const rteOutPort* getSrc() const; 00030 00031 private: 00032 FifoImpl* base; 00033 rteOutPort* out; 00034 rteInPort* in; 00035 00036 friend class rteInPort; 00037 friend class rteOutPort; 00038 }; 00039 00040 #endif