lib/client/global.h

00001 
00002 /* Copyright (c) 2005-2009, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
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> // member
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 
Generated on Mon Aug 10 18:58:39 2009 for Equalizer 0.9 by  doxygen 1.5.8