LCOV - code coverage report
Current view: top level - eq/server/equalizers - equalizer.cpp (source / functions) Hit Total Coverage
Test: Equalizer Lines: 16 28 57.1 %
Date: 2016-09-29 05:02:09 Functions: 5 10 50.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2008-2014, Stefan Eilemann <eile@equalizergraphics.com>
       3             :  *                    2011, Daniel Nachbaur <danielnachbaur@gmail.com>
       4             :  *
       5             :  * This library is free software; you can redistribute it and/or modify it under
       6             :  * the terms of the GNU Lesser General Public License version 2.1 as published
       7             :  * by the Free Software Foundation.
       8             :  *
       9             :  * This library is distributed in the hope that it will be useful, but WITHOUT
      10             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      11             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      12             :  * details.
      13             :  *
      14             :  * You should have received a copy of the GNU Lesser General Public License
      15             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      16             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      17             :  */
      18             : 
      19             : #include "equalizer.h"
      20             : 
      21             : #include "../compound.h"
      22             : #include "../config.h"
      23             : #include "../log.h"
      24             : 
      25             : #include <lunchbox/debug.h>
      26             : 
      27             : namespace eq
      28             : {
      29             : namespace server
      30             : {
      31             : 
      32         276 : Equalizer::Equalizer()
      33             :     : _compound( 0 )
      34         276 :     , _active( true )
      35             : {
      36         276 :     LBVERB << "New Equalizer @" << (void*)this << std::endl;
      37         276 : }
      38             : 
      39           0 : Equalizer::Equalizer( const fabric::Equalizer& from )
      40             :     : fabric::Equalizer( from )
      41             :     , _compound( 0 )
      42           0 :     , _active( true )
      43           0 : {}
      44             : 
      45           0 : Equalizer::Equalizer( const Equalizer& from )
      46             :     : fabric::Equalizer( from )
      47             :     , CompoundListener( from )
      48             :     , _compound( 0 )
      49           0 :     , _active( from._active )
      50           0 : {}
      51             : 
      52           0 : Equalizer& Equalizer::operator = ( const fabric::Equalizer& from )
      53             : {
      54           0 :     fabric::Equalizer::operator = ( from );
      55           0 :     return *this;
      56             : }
      57             : 
      58         552 : Equalizer::~Equalizer()
      59             : {
      60         276 :     attach( 0 );
      61         276 : }
      62             : 
      63         908 : void Equalizer::attach( Compound* compound )
      64             : {
      65         908 :     if( _compound )
      66             :     {
      67         276 :         _compound->removeListener( this );
      68         276 :         _compound = 0;
      69             :     }
      70             : 
      71         908 :     if( compound )
      72             :     {
      73         276 :         _compound = compound;
      74         276 :         compound->addListener( this );
      75             :     }
      76         908 : }
      77             : 
      78           0 : const Config* Equalizer::getConfig() const
      79             : {
      80           0 :     LBASSERT( _compound );
      81           0 :     return _compound->getConfig();
      82             : }
      83             : 
      84             : }
      85          84 : }

Generated by: LCOV version 1.11