LCOV - code coverage report
Current view: top level - eq/server - init.cpp (source / functions) Hit Total Coverage
Test: Equalizer Lines: 9 13 69.2 %
Date: 2017-12-16 05:07:20 Functions: 4 4 100.0 %

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

Generated by: LCOV version 1.11