Equalizer 1.0
|
00001 00002 /* Copyright (c) 2007-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_CONNECTIONTYPE_H 00019 #define CO_CONNECTIONTYPE_H 00020 00021 #include <co/base/debug.h> 00022 #include <iostream> 00023 00024 namespace co 00025 { 00027 enum ConnectionType 00028 { 00029 CONNECTIONTYPE_NONE = 0, 00030 CONNECTIONTYPE_TCPIP, 00031 CONNECTIONTYPE_SDP, 00032 CONNECTIONTYPE_PIPE, 00033 CONNECTIONTYPE_NAMEDPIPE, 00034 CONNECTIONTYPE_IB, 00035 CONNECTIONTYPE_UDP, 00036 CONNECTIONTYPE_MULTICAST = 0x100, 00037 CONNECTIONTYPE_MCIP = CONNECTIONTYPE_MULTICAST, 00038 CONNECTIONTYPE_PGM, 00039 CONNECTIONTYPE_RSP 00040 }; 00041 00042 inline std::ostream& operator << ( std::ostream& os, 00043 const ConnectionType& type ) 00044 { 00045 switch( type ) 00046 { 00047 case CONNECTIONTYPE_TCPIP: 00048 os << "TCPIP"; 00049 break; 00050 00051 case CONNECTIONTYPE_SDP: 00052 os << "SDP"; 00053 break; 00054 00055 case CONNECTIONTYPE_PIPE: 00056 os << "ANON_PIPE"; 00057 break; 00058 00059 case CONNECTIONTYPE_NAMEDPIPE: 00060 os << "PIPE"; 00061 break; 00062 00063 case CONNECTIONTYPE_IB: 00064 os << "IB"; 00065 break; 00066 00067 case CONNECTIONTYPE_UDP: 00068 os << "UDP"; 00069 break; 00070 00071 case CONNECTIONTYPE_MCIP: 00072 os << "MCIP"; 00073 break; 00074 00075 case CONNECTIONTYPE_PGM: 00076 os << "PGM"; 00077 break; 00078 00079 case CONNECTIONTYPE_RSP: 00080 os << "RSP"; 00081 break; 00082 00083 case CONNECTIONTYPE_NONE: 00084 os << "NONE"; 00085 break; 00086 00087 default: 00088 EQASSERTINFO( false, "Not implemented" ); 00089 os << "ERROR"; 00090 break; 00091 } 00092 return os; 00093 } 00094 } 00095 00096 #endif // CO_CONNECTIONTYPE_H