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

port.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 PORT_H
00012 #define PORT_H
00013 
00014 #include "io.h"
00015 #include "portimplt.h"
00016 #include "id.h"
00017 
00018 template<class T>
00019 class InPort : public InPortImplT<T>, public In<T>
00020 {
00021 public:
00022   InPort(const Id& n, In<T>& i);
00023 
00024   void read(T& t);
00025   void read(T* p, unsigned int n);
00026 
00027 // private:
00028   Connector* connector();
00029 };
00030 
00031 template<class T>
00032 class OutPort : public OutPortImplT<T>, public Out<T>
00033 {
00034 public:
00035   OutPort(const Id& n, Out<T>& i);
00036 
00037   void write(const T& t);
00038   void write(const T* p, unsigned int n);
00039 
00040 // private:
00041   Connector* connector();
00042 };
00043 
00044 
00046 
00047 template<class T>
00048 void read(InPort<T>& s, T& t);
00049 
00050 template<class T>
00051 void read(InPort<T>& s, T* p, unsigned int n);
00052 
00053 template<class T>
00054 void write(OutPort<T>& s, const T& t);
00055 
00056 template<class T>
00057 void write(OutPort<T>& s, const T* p, unsigned int n);
00058 
00059 
00061 #ifndef SELECT_H
00062 #include "select.h"
00063 #endif
00064 
00065 // include implementation of template classes
00066 #include "port.cc"
00067 
00068 #endif

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