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

portimplt.cc

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 PORTIMPLT_CC
00012 #define PORTIMPLT_CC
00013 
00015 
00016 #include "rteport.h"
00017 
00018 template<class T>
00019 InPortImplT<T>::InPortImplT(const IdBase& n, In<T>& i) : 
00020   InPortImpl(n, *(i.connector()))
00021 { }
00022 
00023 template<class T> inline
00024 void InPortImplT<T>::read(T& t)
00025 {
00026   rte()->read(&t, 1);
00027 }
00028 
00029 template<class T> inline
00030 void InPortImplT<T>::read(T* p, unsigned int n)
00031 {
00032   rte()->read(p, n);
00033 }
00034 
00036 
00037 template<class T>
00038 OutPortImplT<T>::OutPortImplT(const IdBase& n, Out<T>& o) : 
00039   OutPortImpl(n, *(o.connector()))
00040 { }
00041 
00042 template<class T> inline
00043 void OutPortImplT<T>::write(const T& t)
00044 {
00045   std::vector<rteOutPort*>::iterator i;
00046   for(i = impl.begin(); i != impl.end(); ++i)
00047     (*i)->write(&t, 1);
00048 }
00049 
00050 template<class T> inline
00051 void OutPortImplT<T>::write(const T* p, unsigned int n)
00052 {
00053   std::vector<rteOutPort*>::iterator i;
00054   for(i = impl.begin(); i != impl.end(); ++i)
00055     (*i)->write(p, n);
00056 }
00057 
00058 #endif

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