Equalizer  1.12.0
Parallel Rendering Framework
global.h
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 {
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 
74  static void enterCarbon();
75 
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
static EQ_API const std::string & getWorkDir()
static EQ_API void setWorkDir(const std::string &workDir)
Set the working directory of the program.
EQ_API friend bool exit()
De-initialize the Equalizer fabric namespace.
Global parameter handling for the Equalizer client library.
Definition: global.h:33
static void enterCarbon()
Global lock for all non-thread-safe Carbon API calls.
static EQ_API void setConfigFile(const std::string &configFile)
Set the config file for the app-local server.
static void leaveCarbon()
Global unlock for non-thread-safe Carbon API calls.
Global parameter handling for the Equalizer fabric namespace.
Definition: fabric/global.h:30
static EQ_API const std::string & getConfigFile()
The Equalizer client library.
Definition: eq/agl/types.h:23
static NodeFactory * getNodeFactory()
Definition: global.h:49
static EQ_API const std::string & getProgramName()
static EQ_API void setProgramName(const std::string &programName)
Set the name of the program.
The node factory is a per-node singleton used to create and release Equalizer resource instances...
Definition: nodeFactory.h:36