dfrEqualizer.h

00001 
00002 /* Copyright (c) 2009, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef EQS_DFREQUALIZER_H
00019 #define EQS_DFREQUALIZER_H
00020 
00021 #include "../channelListener.h" // base class
00022 #include "equalizer.h"       // base class
00023 
00024 #include <deque>
00025 #include <map>
00026 
00027 namespace eq
00028 {
00029 namespace server
00030 {
00031     class DFREqualizer;
00032     std::ostream& operator << ( std::ostream& os, const DFREqualizer* );
00033 
00035     class DFREqualizer : public Equalizer, protected ChannelListener
00036     {
00037     public:
00038         DFREqualizer();
00039         virtual ~DFREqualizer();
00040         virtual Equalizer* clone() const { return new DFREqualizer( *this ); }
00041         virtual void toStream( std::ostream& os ) const { os << this; }
00042 
00044         void setFrameRate( const float frameRate ) { _target = frameRate; }
00045 
00047         float getFrameRate() const{ return _target; }
00048 
00050         void setDamping( const float damping ) { _damping = damping; }
00051 
00053         float getDamping() const { return _damping; }
00054 
00056         virtual void attach( Compound* compound );
00057 
00059         virtual void notifyUpdatePre( Compound* compound, 
00060                                       const uint32_t frameNumber );
00061         
00063         virtual void notifyLoadData( Channel* channel, 
00064                                      const uint32_t frameNumber,
00065                                      const uint32_t nStatistics,
00066                                      const eq::Statistic* statistics  );
00067 
00068     protected:
00069         virtual void notifyChildAdded( Compound* compound, Compound* child ){}
00070         virtual void notifyChildRemove( Compound* compound, Compound* child ){}
00071 
00072     private:
00073         float _target; 
00074         float _damping; 
00075 
00076         float _current; 
00077         int64_t _lastTime; 
00078     };
00079 
00080 }
00081 }
00082 
00083 #endif // EQS_DFREQUALIZER_H
Generated on Mon Aug 10 18:58:32 2009 for Equalizer 0.9 by  doxygen 1.5.8