LCOV - code coverage report
Current view: top level - eq/server - init.cpp (source / functions) Hit Total Coverage
Test: lcov2.info Lines: 9 13 69.2 %
Date: 2014-06-18 Functions: 4 4 100.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2010, 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 "init.h"
      19             : 
      20             : #include <eq/fabric/init.h>
      21             : #include <lunchbox/debug.h>
      22             : 
      23             : namespace eq
      24             : {
      25             : namespace server
      26             : {
      27             : namespace
      28             : {
      29             : static bool _initialized = false;
      30             : }
      31             : 
      32           1 : bool init( const int argc, char** argv )
      33             : {
      34           1 :     if( _initialized )
      35             :     {
      36           0 :         LBERROR << "Equalizer server library already initialized" << std::endl;
      37           0 :         return false;
      38             :     }
      39           1 :     _initialized = true;
      40             : 
      41           1 :     return fabric::init( argc, argv );
      42             : }
      43             :     
      44           1 : bool exit()
      45             : {
      46           1 :     if( !_initialized )
      47             :     {
      48           0 :         LBERROR << "Equalizer client library not initialized" << std::endl;
      49           0 :         return false;
      50             :     }
      51           1 :     _initialized = false;
      52             : 
      53           1 :     return fabric::exit();
      54             : }
      55             : 
      56             : }
      57          27 : }

Generated by: LCOV version 1.10