LCOV - code coverage report
Current view: top level - eq/server - layout.cpp (source / functions) Hit Total Coverage
Test: Equalizer Lines: 16 20 80.0 %
Date: 2016-09-29 05:02:09 Functions: 7 8 87.5 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2009-2015, 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             : #include <boost/foreach.hpp>
      27             : 
      28             : namespace eq
      29             : {
      30             : namespace server
      31             : {
      32             : typedef fabric::Layout< Config, Layout, View > Super;
      33             : 
      34         654 : Layout::Layout( Config* parent )
      35             :         : Super( parent )
      36         654 :         , _state( STATE_ACTIVE ){}
      37             : 
      38        1304 : Layout::~Layout(){}
      39             : 
      40           4 : ServerPtr Layout::getServer()
      41             : {
      42           4 :     Config* config = getConfig();
      43           4 :     LBASSERT( config );
      44           4 :     return ( config ? config->getServer() : 0 );
      45             : }
      46             : 
      47           0 : void Layout::postDelete()
      48             : {
      49           0 :     _state = STATE_DELETE;
      50           0 :     getConfig()->postNeedsFinish();
      51           0 : }
      52             : 
      53           4 : void Layout::trigger( const Canvas* canvas, const bool active )
      54             : {
      55           4 :     LBASSERT( canvas );
      56           4 :     getConfig()->postNeedsFinish();
      57             : 
      58           4 :     const Views& views = getViews();
      59           8 :     for( Views::const_iterator i = views.begin(); i != views.end(); ++i )
      60             :     {
      61           4 :         View* view = *i;
      62           4 :         view->trigger( canvas, active );
      63             :     }
      64           4 : }
      65             : 
      66             : }
      67             : }
      68             : 
      69             : #include "nodeFactory.h"
      70             : #include "../fabric/layout.ipp"
      71             : 
      72             : template class eq::fabric::Layout< eq::server::Config, eq::server::Layout,
      73             :                                    eq::server::View >;
      74             : /** @cond IGNORE */
      75             : template std::ostream& eq::fabric::operator << ( std::ostream&,
      76             :                                                  const eq::fabric::Layout<
      77             :                                                  eq::server::Config,
      78             :                                                  eq::server::Layout,
      79          84 :                                                  eq::server::View >& );
      80             : /** @endcond */

Generated by: LCOV version 1.11