Changeset 9451 in orxonox.OLD for branches/proxy/src/lib
- Timestamp:
- Jul 25, 2006, 10:39:29 AM (18 years ago)
- Location:
- branches/proxy/src/lib/network/monitor
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/monitor/network_monitor.cc
r9445 r9451 240 240 * prints out the debug informations 241 241 */ 242 void NetworkMonitor::debug() 242 void NetworkMonitor::debug() const 243 243 { 244 244 PRINT(0)("================================= Network Monitor::debug() =====\n"); … … 248 248 PRINT(0)(" Max players on this server: %i\n", SharedNetworkData::getInstance()->getMaxPlayer()); 249 249 250 std::list<NetworkNode*>:: iterator it = this->nodeList.begin();250 std::list<NetworkNode*>::const_iterator it = this->nodeList.begin(); 251 251 for(; it != this->nodeList.end(); it++) 252 252 { -
branches/proxy/src/lib/network/monitor/network_monitor.h
r9445 r9451 80 80 81 81 void process(); 82 void debug() ;82 void debug() const; 83 83 84 84 -
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 { -
branches/proxy/src/lib/network/monitor/network_node.h
r9406 r9451 32 32 void removeMasterServer(PeerInfo* node); 33 33 34 PeerInfo* getClient(int index) ;35 PeerInfo* getActiveProxyServer(int index) ;36 PeerInfo* getPassiveProxyServer(int index) ;37 PeerInfo* getMasterServer(int index) ;34 PeerInfo* getClient(int index) const; 35 PeerInfo* getActiveProxyServer(int index) const; 36 PeerInfo* getPassiveProxyServer(int index) const; 37 PeerInfo* getMasterServer(int index) const; 38 38 39 39 /** @returns the master server list */ 40 inline std::list<PeerInfo*> getMasterServer() { return this->masterServerList; }40 inline std::list<PeerInfo*> getMasterServer() const { return this->masterServerList; } 41 41 /** @returns the active proxy server list */ 42 inline std::list<PeerInfo*> getActiveProxyServer() { return this->activeProxyServerList; }42 inline std::list<PeerInfo*> getActiveProxyServer() const { return this->activeProxyServerList; } 43 43 /** @returns the passive proxy server list */ 44 inline std::list<PeerInfo*> getPassiveProxyServer() { return this->passiveProxyServerList; }44 inline std::list<PeerInfo*> getPassiveProxyServer() const { return this->passiveProxyServerList; } 45 45 /** @returns the client list */ 46 inline std::list<PeerInfo*> getClient() { return this->clientList; }46 inline std::list<PeerInfo*> getClient() const { return this->clientList; } 47 47 48 48 49 49 /** @returns the number of players */ 50 inline int getPlayerNumber() { return this->playerNumber; }50 inline int getPlayerNumber() const { return this->playerNumber; } 51 51 /** @returns the node type of this node */ 52 inline int getNodeType() { return this->peerInfo->nodeType; }52 inline int getNodeType() const { return this->peerInfo->nodeType; } 53 53 /** @returns the peer info of this node */ 54 inline PeerInfo* getPeerInfo() { return this->peerInfo; }54 inline PeerInfo* getPeerInfo() const { return this->peerInfo; } 55 55 56 void debug(int depth) ;56 void debug(int depth) const; 57 57 58 58
Note: See TracChangeset
for help on using the changeset viewer.