equalizer.h

00001 
00002 /* Copyright (c) 2008-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_EQUALIZER_H
00019 #define EQS_EQUALIZER_H
00020 
00021 #include "../compoundListener.h" // base class
00022 #include "../types.h"
00023 
00024 namespace eq
00025 {
00026 namespace server
00027 {
00036     class Equalizer : protected CompoundListener
00037     {
00038     public:
00039         Equalizer();
00040         Equalizer( const Equalizer& from );
00041         virtual ~Equalizer();
00042 
00044         virtual Equalizer* clone() const = 0;
00045 
00047         virtual void toStream( std::ostream& os ) const = 0;
00048 
00050         const Compound* getCompound() const { return _compound; }
00051         Compound* getCompound()             { return _compound; }
00052 
00054         const Config* getConfig() const;
00055 
00057         virtual void attach( Compound* compound );
00058 
00059         void setFrozen( const bool onOff ) { _frozen = onOff; }
00060         bool isFrozen() const { return _frozen; }
00061 
00062     private:
00063         // override in sub-classes to handle dynamic compounds.
00064         virtual void notifyChildAdded( Compound* compound, Compound* child )
00065             { EQUNIMPLEMENTED }
00066         virtual void notifyChildRemove( Compound* compound, Compound* child )
00067             { EQUNIMPLEMENTED }
00068 
00069         Compound* _compound;       
00070         bool      _frozen;
00071     };
00072 
00073     inline std::ostream& operator << ( std::ostream& os, const Equalizer* eq )
00074     {
00075         if( eq )
00076             eq->toStream( os );
00077         return os;
00078     }
00079 }
00080 }
00081 
00082 #endif // EQS_EQUALIZER_H
Generated on Mon Aug 10 18:58:32 2009 for Equalizer 0.9 by  doxygen 1.5.8