Changeset 9589 in orxonox.OLD for branches/proxy/src/lib/network/monitor
- Timestamp:
- Jul 28, 2006, 11:32:05 PM (18 years ago)
- Location:
- branches/proxy/src/lib/network/monitor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/monitor/network_monitor.cc
r9586 r9589 227 227 228 228 /** 229 * @param userId of the searched node 230 * @returns the PeerInfo of the userId peer 231 */ 232 PeerInfo* NetworkMonitor::getPeerByUserId( int userId) 233 { 234 PeerInfo* pInfo; 235 std::list<NetworkNode*>::iterator it = this->nodeList.begin(); 236 for(; it != this->nodeList.end(); it++) 237 { 238 pInfo = (*it)->getPeerByUserId(userId); 239 if( pInfo != NULL) 240 return pInfo; 241 } 242 return NULL; 243 } 244 245 /** 246 * searches for a given NetworkNode 247 * @param userId of the searched node 248 * @returns the PeerInfo of the userId peer 249 */ 250 NetworkNode* NetworkMonitor::getNodeByUserId( int userId) 251 { 252 std::list<NetworkNode*>::iterator it = this->nodeList.begin(); 253 for(; it != this->nodeList.end(); it++) 254 { 255 if( (*it)->getPeerInfo()->userId == userId) 256 return (*it); 257 } 258 return NULL; 259 } 260 261 262 /** 229 263 * this displays the network monitor gui 230 264 */ -
branches/proxy/src/lib/network/monitor/network_monitor.h
r9586 r9589 79 79 80 80 inline const std::list<NetworkNode*>& getNodeList() const { return this->nodeList; }; 81 /** @param userId of the searched node @returns the PeerInfo of the userId peer */82 inline PeerInfo* getPeerByUserId( int userId) { return this->localNode->getPeerByUserId(userId); }81 PeerInfo* getPeerByUserId( int userId); 82 NetworkNode* getNodeByUserId( int userId); 83 83 84 84
Note: See TracChangeset
for help on using the changeset viewer.