Changeset 9451 in orxonox.OLD for branches/proxy/src/lib/network/monitor/network_node.cc
- Timestamp:
- Jul 25, 2006, 10:39:29 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/monitor/network_node.cc
r9406 r9451 152 152 * @return the client in the list or NULL if none 153 153 */ 154 PeerInfo* NetworkNode::getClient(int index) 154 PeerInfo* NetworkNode::getClient(int index) const 155 155 { 156 156 if( this->clientList.size() < index) 157 157 return NULL; 158 158 159 std::list<PeerInfo*>:: iterator it = this->clientList.begin();159 std::list<PeerInfo*>::const_iterator it = this->clientList.begin(); 160 160 for(int i = 0; it != this->clientList.end(); it++, i++) 161 161 { … … 172 172 * @return the active proxy server in the list or NULL if none 173 173 */ 174 PeerInfo* NetworkNode::getActiveProxyServer(int index) 174 PeerInfo* NetworkNode::getActiveProxyServer(int index) const 175 175 { 176 176 if( this->activeProxyServerList.size() < index) 177 177 return NULL; 178 178 179 std::list<PeerInfo*>:: iterator it = this->activeProxyServerList.begin();179 std::list<PeerInfo*>::const_iterator it = this->activeProxyServerList.begin(); 180 180 for(int i = 0; it != this->activeProxyServerList.end(); it++, i++) 181 181 { … … 192 192 * @return the passive proxy server in the list or NULL if none 193 193 */ 194 PeerInfo* NetworkNode::getPassiveProxyServer(int index) 194 PeerInfo* NetworkNode::getPassiveProxyServer(int index) const 195 195 { 196 196 if( this->passiveProxyServerList.size() < index) 197 197 return NULL; 198 198 199 std::list<PeerInfo*>:: iterator it = this->passiveProxyServerList.begin();199 std::list<PeerInfo*>::const_iterator it = this->passiveProxyServerList.begin(); 200 200 for(int i = 0; it != this->passiveProxyServerList.end(); it++, i++) 201 201 { … … 212 212 * @return the master server in the list or NULL if none 213 213 */ 214 PeerInfo* NetworkNode::getMasterServer(int index) 214 PeerInfo* NetworkNode::getMasterServer(int index) const 215 215 { 216 216 if( this->masterServerList.size() < index) 217 217 return NULL; 218 218 219 std::list<PeerInfo*>:: iterator it = this->masterServerList.begin();219 std::list<PeerInfo*>::const_iterator it = this->masterServerList.begin(); 220 220 for(int i = 0; it != this->masterServerList.end(); it++, i++) 221 221 { … … 232 232 * @param depth: depth in the tree 233 233 */ 234 void NetworkNode::debug(int depth) 234 void NetworkNode::debug(int depth) const 235 235 { 236 236 PRINT(0)(" = %s\n", this->peerInfo->getNodeTypeString().c_str()); 237 237 238 238 PRINT(0)(" master servers: %i\n", this->masterServerList.size()); 239 std::list<PeerInfo*>:: iterator it = this->masterServerList.begin();239 std::list<PeerInfo*>::const_iterator it = this->masterServerList.begin(); 240 240 for(; it != this->masterServerList.end(); it++) 241 241 {
Note: See TracChangeset
for help on using the changeset viewer.