Equalizer 1.0

co/global.h

00001 
00002 /* Copyright (c) 2005-2011, 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 CO_GLOBAL_H
00019 #define CO_GLOBAL_H
00020 
00021 #include <co/api.h>
00022 #include <co/base/types.h>
00023 #include <string>
00024 
00025 namespace co
00026 {
00027     // global defines
00028 
00032     class Global
00033     {
00034     public:
00040         CO_API static void setProgramName( const std::string& programName );
00041 
00043         CO_API static const std::string& getProgramName();
00044 
00050         CO_API static void setWorkDir( const std::string& workDir );
00051 
00053         CO_API static const std::string& getWorkDir();
00054 
00060         CO_API static void setDefaultPort( const uint16_t port );
00061 
00063         CO_API static uint16_t getDefaultPort();
00064 
00074         CO_API static void setObjectBufferSize( const uint32_t size );
00075 
00077         CO_API static uint32_t getObjectBufferSize();
00078 
00081         // Note: also update string array initialization in global.cpp
00083         enum IAttribute
00084         {
00085             IATTR_INSTANCE_CACHE_SIZE,   
00086 
00087             IATTR_NODE_SEND_QUEUE_SIZE,
00088             IATTR_NODE_SEND_QUEUE_AGE,   
00089             IATTR_RSP_ACK_TIMEOUT,       
00090             IATTR_RSP_ERROR_DOWNSCALE,   
00091             IATTR_RSP_ERROR_UPSCALE,     
00092             IATTR_RSP_ERROR_MAXSCALE,    
00093             IATTR_RSP_MIN_SENDRATE_SHIFT, 
00094             IATTR_RSP_NUM_BUFFERS,       
00095             IATTR_RSP_ACK_FREQUENCY,     
00096             IATTR_UDP_MTU,               
00097             IATTR_UDP_BUFFER_SIZE,       
00098             IATTR_ALL
00099         };
00100 
00102         CO_API static void setIAttribute( const IAttribute attr,
00103                                              const int32_t value );
00104 
00106         CO_API static int32_t getIAttribute( const IAttribute attr );
00108     };
00109 }
00110 
00111 #endif // CO_GLOBAL_H
Generated on Sun May 8 2011 19:11:06 for Equalizer 1.0 by  doxygen 1.7.3