Equalizer  1.6.1
client/global.h
1 
2 /* Copyright (c) 2005-2013, Stefan Eilemann <eile@equalizergraphics.com>
3  * 2010, Cedric Stalder <cedric.stalder@gmail.com>
4  * 2012, 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/client/api.h>
24 #include <eq/client/init.h> // friend
25 #include <eq/client/types.h>
26 
27 #include <eq/fabric/global.h> // base class
28 #include <eq/fabric/iAttribute.h> // enum definition
29 
30 namespace eq
31 {
33  class Global : public fabric::Global
34  {
35  public:
37  EQ_API static void setProgramName( const std::string& programName );
38 
40  EQ_API static const std::string& getProgramName();
41 
43  EQ_API static void setWorkDir( const std::string& workDir );
44 
46  EQ_API static const std::string& getWorkDir();
47 
49  static NodeFactory* getNodeFactory() { return _nodeFactory; }
50 
61  EQ_API static void setConfigFile( const std::string& configFile );
62 
64  EQ_API static const std::string& getConfigFile();
65 
72  static void enterCarbon();
73 
75  static void leaveCarbon();
76 
77  private:
78  EQ_API friend bool _init( const int argc, char** argv,
79  NodeFactory* nodeFactory );
80  EQ_API friend bool exit();
81 
82  static NodeFactory* _nodeFactory;
83  static std::string _configFile;
84  };
85 }
86 
87 #endif // EQ_GLOBAL_H
static void enterCarbon()
Global lock for all non-thread-safe Carbon API calls.
static const std::string & getWorkDir()
static const std::string & getConfigFile()
Global parameter handling for the Equalizer client library.
Definition: client/global.h:33
static NodeFactory * getNodeFactory()
Definition: client/global.h:49
static void setConfigFile(const std::string &configFile)
Set the config file for the app-local server.
The node factory is a per-node singleton used to create and release Equalizer resource instances...
Definition: nodeFactory.h:36
static const std::string & getProgramName()
static void setWorkDir(const std::string &workDir)
Set the working directory of the program.
static void leaveCarbon()
Global unlock for non-thread-safe Carbon API calls.
static void setProgramName(const std::string &programName)
Set the name of the program.
friend bool exit()
De-initialize the Equalizer client library.
Global parameter handling for the Equalizer fabric namespace.
Definition: fabric/global.h:30