Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

networkbase.h

Go to the documentation of this file.
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 NETWORKBASE_H
00012 #define NETWORKBASE_H
00013 
00014 #include "component.h"
00015 #include <vector>
00016 
00017 // class ProcessNetwork: a network of processes and process networks
00018 
00019 class ProcessBase;
00020 class FifoBase;
00021 
00022 class NetworkBase : public Component
00023 {
00024 public:
00025   NetworkBase(const IdBase& n);
00026 
00027   NetworkBase* parentNetwork() const;
00028 
00029   unsigned int nrFifos() const;
00030   unsigned int nrProcesses() const;
00031   unsigned int nrNetworks() const;
00032 
00033   FifoBase*    getFifo(unsigned int i) const;
00034   ProcessBase* getProcess(unsigned int i) const;
00035   NetworkBase* getNetwork(unsigned int i) const;
00036 
00037 private:
00038   friend void insert(NetworkBase* n, FifoBase* f);
00039   friend void insert(NetworkBase* n, ProcessBase* p);
00040   friend void insert(NetworkBase* n, NetworkBase* p);
00041 
00042   typedef std::vector<FifoBase*> Fifos;
00043   typedef std::vector<ProcessBase*> Processes;
00044   typedef std::vector<NetworkBase*> Networks;
00045   typedef Fifos::iterator FifoIterator;
00046   typedef Processes::iterator ProcessIterator;
00047   typedef Networks::iterator NetworkIterator;
00048 
00049   Fifos   fi;
00050   Processes pr;
00051   Networks  nw;
00052 };
00053 
00054 #endif

Generated on Wed Feb 15 14:52:39 2006 for yapi by doxygen 1.3.2