LCOV - code coverage report
Current view: top level - eq - global.h (source / functions) Hit Total Coverage
Test: Equalizer Lines: 1 1 100.0 %
Date: 2016-07-30 05:04:55 Functions: 1 1 100.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2005-2016, Stefan Eilemann <eile@equalizergraphics.com>
       3             :  *                          Cedric Stalder <cedric.stalder@gmail.com>
       4             :  *                          Daniel Nachbaur <danielnachbaur@gmail.com>
       5             :  *
       6             :  * This library is free software; you can redistribute it and/or modify it under
       7             :  * the terms of the GNU Lesser General Public License version 2.1 as published
       8             :  * by the Free Software Foundation.
       9             :  *
      10             :  * This library is distributed in the hope that it will be useful, but WITHOUT
      11             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      12             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      13             :  * details.
      14             :  *
      15             :  * You should have received a copy of the GNU Lesser General Public License
      16             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      17             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      18             :  */
      19             : 
      20             : #ifndef EQ_GLOBAL_H
      21             : #define EQ_GLOBAL_H
      22             : 
      23             : #include <eq/api.h>
      24             : #include <eq/init.h>       // friend
      25             : #include <eq/types.h>
      26             : 
      27             : #include <eq/fabric/global.h>     // base class
      28             : #include <eq/fabric/iAttribute.h> // enum definition
      29             : 
      30             : namespace eq
      31             : {
      32             : /** Global parameter handling for the Equalizer client library. */
      33             : class Global : public fabric::Global
      34             : {
      35             : public:
      36             :     /** Set the name of the program. @version 1.5.2 */
      37             :     EQ_API static void setProgramName( const std::string& programName );
      38             : 
      39             :     /** @return the program name. @version 1.5.2 */
      40             :     EQ_API static const std::string& getProgramName();
      41             : 
      42             :     /** Set the working directory of the program. @version 1.5.2 */
      43             :     EQ_API static void setWorkDir( const std::string& workDir );
      44             : 
      45             :     /** @return the working directory of the program. @version 1.5.2 */
      46             :     EQ_API static const std::string& getWorkDir();
      47             : 
      48             :     /** @return the node factory. @version 1.0 */
      49          21 :     static NodeFactory* getNodeFactory() { return _nodeFactory; }
      50             : 
      51             :     /**
      52             :      * Set the config file for the app-local server.
      53             :      *
      54             :      * When started without specifying an explicit server connection, Equalizer
      55             :      * will create an server instance in an application thread using this config
      56             :      * file.
      57             :      *
      58             :      * @param configFile the default configFile.
      59             :      * @version 1.0
      60             :      */
      61             :     EQ_API static void setConfigFile( const std::string& configFile );
      62             : 
      63             :     /** @return the config file for the app-local server. @version 1.0 */
      64             :     EQ_API static const std::string& getConfigFile();
      65             : 
      66             :     /**
      67             :      * Global lock for all non-thread-safe Carbon API calls.
      68             :      *
      69             :      * Note: this is a NOP on non-AGL builds. Do not use unless you know the
      70             :      * side effects, i.e., ask on the eq-dev mailing list.
      71             :      *
      72             :      * @version 1.0
      73             :      */
      74             :     static void enterCarbon();
      75             : 
      76             :     /** Global unlock for non-thread-safe Carbon API calls. @version 1.0 */
      77             :     static void leaveCarbon();
      78             : 
      79             : private:
      80             :     EQ_API friend bool _init( const int argc, char** argv,
      81             :                               NodeFactory* nodeFactory );
      82             :     EQ_API friend bool exit();
      83             : 
      84             :     static NodeFactory* _nodeFactory;
      85             :     static std::string  _configFile;
      86             : };
      87             : }
      88             : 
      89             : #endif // EQ_GLOBAL_H

Generated by: LCOV version 1.11