LCOV - code coverage report
Current view: top level - eq/server - layout.cpp (source / functions) Hit Total Coverage
Test: lcov2.info Lines: 16 20 80.0 %
Date: 2014-06-18 Functions: 7 8 87.5 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2009-2011, Stefan Eilemann <eile@equalizergraphics.com> 
       3             :  *
       4             :  * This library is free software; you can redistribute it and/or modify it under
       5             :  * the terms of the GNU Lesser General Public License version 2.1 as published
       6             :  * by the Free Software Foundation.
       7             :  *  
       8             :  * This library is distributed in the hope that it will be useful, but WITHOUT
       9             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      10             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      11             :  * details.
      12             :  * 
      13             :  * You should have received a copy of the GNU Lesser General Public License
      14             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      15             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      16             :  */
      17             : 
      18             : #include "layout.h"
      19             : 
      20             : #include "canvas.h"
      21             : #include "config.h"
      22             : #include "view.h"
      23             : 
      24             : #include <eq/fabric/paths.h>
      25             : #include <co/dataOStream.h>
      26             : 
      27             : namespace eq
      28             : {
      29             : namespace server
      30             : {
      31             : typedef fabric::Layout< Config, Layout, View > Super;
      32             : 
      33         380 : Layout::Layout( Config* parent )
      34             :         : Super( parent )
      35         380 :         , _state( STATE_ACTIVE ){}
      36             : 
      37         758 : Layout::~Layout(){}
      38             : 
      39          63 : ServerPtr Layout::getServer() 
      40             : {
      41          63 :     Config* config = getConfig();
      42          63 :     LBASSERT( config );
      43          63 :     return ( config ? config->getServer() : 0 );
      44             : }
      45             : 
      46           0 : void Layout::postDelete()
      47             : {
      48           0 :     _state = STATE_DELETE;
      49           0 :     getConfig()->postNeedsFinish();
      50           0 : }
      51             : 
      52          16 : void Layout::trigger( const Canvas* canvas, const bool active )
      53             : {
      54          16 :     LBASSERT( canvas );
      55          16 :     getConfig()->postNeedsFinish();
      56             : 
      57          16 :     const Views& views = getViews();
      58          32 :     for( Views::const_iterator i = views.begin(); i != views.end(); ++i )
      59             :     {
      60          16 :         View* view = *i;
      61          16 :         view->trigger( canvas, active );
      62             :     }
      63          16 : }
      64             : 
      65             : }
      66             : }
      67             : 
      68             : #include "nodeFactory.h"
      69             : #include "../fabric/layout.ipp"
      70             : 
      71             : template class eq::fabric::Layout< eq::server::Config, eq::server::Layout,
      72             :                                    eq::server::View >;
      73             : /** @cond IGNORE */
      74             : template std::ostream& eq::fabric::operator << ( std::ostream&,
      75             :                                                  const eq::fabric::Layout<
      76             :                                                  eq::server::Config,
      77             :                                                  eq::server::Layout,
      78          27 :                                                  eq::server::View >& );
      79             : /** @endcond */

Generated by: LCOV version 1.10