Changeset 9494 in orxonox.OLD for trunk/src/lib/network/peer_info.cc
- Timestamp:
- Jul 27, 2006, 10:44:28 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/network/peer_info.cc
r9406 r9494 54 54 55 55 56 std::string PeerInfo::getNodeTypeString() 56 const std::string& PeerInfo::getNodeTypeString() const 57 57 { 58 switch( this->nodeType) 59 { 60 case NET_CLIENT: 61 return std::string("client"); 62 case NET_PROXY_SERVER_ACTIVE: 63 return std::string("proxy server active"); 64 case NET_PROXY_SERVER_PASSIVE: 65 return std::string("proxy server passive"); 66 case NET_MASTER_SERVER: 67 return std::string("master server"); 68 } 58 return PeerInfo::nodeTypeToString( this->nodeType ); 59 // the above does the same, and is faster in it. (there is no case where node is uninit i hope!) 60 } 69 61 70 return std::string("node is uninit"); 62 const std::string& PeerInfo::nodeTypeToString(unsigned int type) 63 { 64 return PeerInfo::nodeNames[type]; 71 65 } 66 67 68 const std::string PeerInfo::nodeNames[] = 69 { 70 71 "maser server", 72 "proxy server active", 73 "proxy server passive", 74 "client", 75 "node is not initialized" 76 };
Note: See TracChangeset
for help on using the changeset viewer.