lib/client/global.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef EQ_GLOBAL_H
00019 #define EQ_GLOBAL_H
00020
00021 #include <eq/base/base.h>
00022 #include <eq/base/lock.h>
00023 #include <eq/client/types.h>
00024 #include <string>
00025
00026 namespace eq
00027 {
00028 class NodeFactory;
00029 class PluginRegistry;
00030
00032 bool testInitPluginDirectories();
00036 enum IAttrValue
00037 {
00038 UNDEFINED = -0xfffffff,
00039 RGBA32F = -13,
00040 RGBA16F = -12,
00041 FBO = -11,
00042 LOCAL_SYNC = -10,
00043 DRAW_SYNC = -9,
00044 ASYNC = -8,
00045 PBUFFER = -7,
00046 WINDOW = -6,
00047 VERTICAL = -5,
00048 QUAD = -4,
00049 ANAGLYPH = -3,
00050
00054 NICEST = -2,
00055 AUTO = -1,
00056 OFF = 0,
00057 ON = 1,
00058
00062 FASTEST = ON,
00063 HORIZONTAL = ON
00064 };
00065
00069 class Global
00070 {
00071 public:
00073 static NodeFactory* getNodeFactory() { return _nodeFactory; }
00074
00080 EQ_EXPORT static void setServer( const std::string& server );
00081
00083 EQ_EXPORT static const std::string& getServer();
00084
00090 EQ_EXPORT static void setConfigFile( const std::string& configFile );
00091
00093 EQ_EXPORT static const std::string& getConfigFile();
00094
00100 static void enterCarbon();
00102 static void leaveCarbon();
00103
00108 EQ_EXPORT static const StringVector& getPluginDirectories();
00109
00111 EQ_EXPORT static void addPluginDirectory( const std::string& path );
00112
00114 EQ_EXPORT static void removePluginDirectory( const std::string& path );
00115
00117 EQ_EXPORT static PluginRegistry& getPluginRegistry();
00118
00119 private:
00120 EQ_EXPORT friend bool init( const int argc, char** argv,
00121 NodeFactory* nodeFactory );
00122 EQ_EXPORT friend bool exit();
00123
00124 static StringVector _initPluginDirectories();
00125 friend bool testInitPluginDirectories();
00126
00127 static NodeFactory* _nodeFactory;
00128
00129 static std::string _server;
00130 static std::string _configFile;
00131 static PluginRegistry _pluginRegistry;
00132 static StringVector _pluginDirectories;
00133 };
00134
00135 EQ_EXPORT std::ostream& operator << ( std::ostream& os,
00136 const IAttrValue value );
00137 }
00138
00139 #endif // EQ_GLOBAL_H
00140