Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

VrNop.h

Go to the documentation of this file.
00001 /* -*- Mode: c++ -*- 
00002  *
00003  *  Copyright 1997 Massachusetts Institute of Technology
00004  * 
00005  *  Permission to use, copy, modify, distribute, and sell this software and its
00006  *  documentation for any purpose is hereby granted without fee, provided that
00007  *  the above copyright notice appear in all copies and that both that
00008  *  copyright notice and this permission notice appear in supporting
00009  *  documentation, and that the name of M.I.T. not be used in advertising or
00010  *  publicity pertaining to distribution of the software without specific,
00011  *  written prior permission.  M.I.T. makes no representations about the
00012  *  suitability of this software for any purpose.  It is provided "as is"
00013  *  without express or implied warranty.
00014  * 
00015  */
00016 
00017 
00018 #ifndef _VRNOP_H_
00019 #define _VRNOP_H_
00020 
00021 #include <VrSigProc.h>
00022 
00023 /*** This module just copies its input to its output ***/
00024 template<class ioType> 
00025 class VrNop : public VrSigProc {
00026 protected:
00027 public: 
00028   virtual const char *name() { return "VrNop"; }
00029   virtual int work(VrSampleRange output, void *o[],
00030                    VrSampleRange inputs[], void *i[]);
00031   VrNop(): VrSigProc(1, sizeof(ioType), sizeof(ioType)) {};
00032 };
00033 
00034 template<class ioType> int
00035 VrNop<ioType>::work(VrSampleRange output, void *ao[],
00036                 VrSampleRange inputs[], void *ai[])
00037 {
00038   ioType **i = (ioType **)ai;
00039   ioType **o = (ioType **)ao;
00040 
00041   memcpy(o[0],i[0],output.size*sizeof(ioType));
00042   return output.size;
00043 }
00044 
00045 #endif

Generated on Tue Mar 15 23:47:08 2005 for GNU Radio by  doxygen 1.4.0