FrameAdder.hxx

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG)
00003  *                         UNIVERSITAT POMPEU FABRA
00004  *
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 #ifndef _Frame_Adder_
00023 #define _Frame_Adder_
00024 
00025 #include "ProcessingComposite.hxx"
00026 #include "DynamicType.hxx"
00027 #include "Frame.hxx"
00028 #include "InPort.hxx"
00029 #include "OutPort.hxx"
00030 #include "SpectrumAdder2.hxx"
00031 #include "SpectralPeakArrayAdder.hxx"
00032 
00033 namespace CLAM {
00034 
00035 
00036         class FrameAdderConfig: public ProcessingConfig
00037         {
00038         public:
00039                 DYNAMIC_TYPE_USING_INTERFACE (FrameAdderConfig, 0,ProcessingConfig);
00040         };
00041 
00048         class FrameAdder: public ProcessingComposite {
00049                 
00050                 FrameAdderConfig mConfig;
00051 
00052 
00053                 const char *GetClassName() const {return "FrameAdder";}
00054 
00055 
00059                 bool ConcreteConfigure(const ProcessingConfig&);
00060 
00061                 void AttachChildren();
00062 
00063         public:
00064                 FrameAdder();
00065 
00066                 FrameAdder(const FrameAdderConfig &c);
00067 
00068                 ~FrameAdder() {};
00069 
00070                 const ProcessingConfig &GetConfig() const { return mConfig;}
00071 
00072                 bool Do(void);
00073 
00074                 bool Do(const Frame& in1, const Frame& in2, Frame& out);
00075 
00076         
00077 
00079                 InPort<Frame> mIn1;
00080                 InPort<Frame> mIn2;
00081                 OutPort<Frame> mOut;
00082 
00083         private:
00085                 SpectrumAdder2 mPO_SpectrumAdder;
00086                 SpectralPeakArrayAdder mPO_PeaksAdder;
00087 
00088         };
00089 
00090 }
00091 
00092 #endif // _Frame_Adder_
00093 
Generated by  doxygen 1.6.3