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 CONNECTOR_H 00012 #define CONNECTOR_H 00013 00014 #include "idbase.h" 00015 #include <vector> 00016 00017 // class Connector 00018 00019 class Connector : public IdBase 00020 { 00021 public: 00022 Connector(const IdBase& n); 00023 00024 unsigned int nrSrc() const; 00025 unsigned int nrDst() const; 00026 Connector* getSrc(unsigned int i=0) const; 00027 Connector* getDst(unsigned int i=0) const; 00028 00029 virtual bool isFifo() const { return false; } 00030 00031 private: 00032 friend void link(Connector& s, Connector& d); 00033 00034 typedef std::vector<Connector*> Connectors; 00035 typedef Connectors::iterator Iterator; 00036 00037 Connectors s; 00038 Connectors d; 00039 }; 00040 00041 #endif