Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9451 in orxonox.OLD for branches/proxy


Ignore:
Timestamp:
Jul 25, 2006, 10:39:29 AM (18 years ago)
Author:
bensch
Message:

consts

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  
    240240 * prints out the debug informations
    241241 */
    242 void NetworkMonitor::debug()
     242void NetworkMonitor::debug() const
    243243{
    244244  PRINT(0)("================================= Network Monitor::debug() =====\n");
     
    248248  PRINT(0)(" Max players on this server: %i\n", SharedNetworkData::getInstance()->getMaxPlayer());
    249249
    250   std::list<NetworkNode*>::iterator it = this->nodeList.begin();
     250  std::list<NetworkNode*>::const_iterator it = this->nodeList.begin();
    251251  for(; it != this->nodeList.end(); it++)
    252252  {
  • branches/proxy/src/lib/network/monitor/network_monitor.h

    r9445 r9451  
    8080
    8181    void process();
    82     void debug();
     82    void debug() const;
    8383
    8484
  • branches/proxy/src/lib/network/monitor/network_node.cc

    r9406 r9451  
    152152 * @return the client in the list or NULL if none
    153153 */
    154 PeerInfo* NetworkNode::getClient(int index)
     154PeerInfo* NetworkNode::getClient(int index) const
    155155{
    156156  if( this->clientList.size() < index)
    157157    return NULL;
    158158
    159   std::list<PeerInfo*>::iterator it = this->clientList.begin();
     159  std::list<PeerInfo*>::const_iterator it = this->clientList.begin();
    160160  for(int i = 0; it != this->clientList.end(); it++, i++)
    161161  {
     
    172172 * @return the active proxy server in the list or NULL if none
    173173 */
    174 PeerInfo* NetworkNode::getActiveProxyServer(int index)
     174PeerInfo* NetworkNode::getActiveProxyServer(int index) const
    175175{
    176176  if( this->activeProxyServerList.size() < index)
    177177    return NULL;
    178178
    179   std::list<PeerInfo*>::iterator it = this->activeProxyServerList.begin();
     179  std::list<PeerInfo*>::const_iterator it = this->activeProxyServerList.begin();
    180180  for(int i = 0; it != this->activeProxyServerList.end(); it++, i++)
    181181  {
     
    192192 * @return the passive proxy server in the list or NULL if none
    193193 */
    194 PeerInfo* NetworkNode::getPassiveProxyServer(int index)
     194PeerInfo* NetworkNode::getPassiveProxyServer(int index) const
    195195{
    196196  if( this->passiveProxyServerList.size() < index)
    197197    return NULL;
    198198
    199   std::list<PeerInfo*>::iterator it = this->passiveProxyServerList.begin();
     199  std::list<PeerInfo*>::const_iterator it = this->passiveProxyServerList.begin();
    200200  for(int i = 0; it != this->passiveProxyServerList.end(); it++, i++)
    201201  {
     
    212212 * @return the master server in the list or NULL if none
    213213 */
    214 PeerInfo* NetworkNode::getMasterServer(int index)
     214PeerInfo* NetworkNode::getMasterServer(int index) const
    215215{
    216216  if( this->masterServerList.size() < index)
    217217    return NULL;
    218218
    219   std::list<PeerInfo*>::iterator it = this->masterServerList.begin();
     219  std::list<PeerInfo*>::const_iterator it = this->masterServerList.begin();
    220220  for(int i = 0; it != this->masterServerList.end(); it++, i++)
    221221  {
     
    232232 * @param depth: depth in the tree
    233233 */
    234 void NetworkNode::debug(int depth)
     234void NetworkNode::debug(int depth) const
    235235{
    236236  PRINT(0)(" = %s\n", this->peerInfo->getNodeTypeString().c_str());
    237237
    238238  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();
    240240  for(; it != this->masterServerList.end(); it++)
    241241  {
  • branches/proxy/src/lib/network/monitor/network_node.h

    r9406 r9451  
    3232    void removeMasterServer(PeerInfo* node);
    3333
    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;
    3838
    3939    /** @returns the master server list */
    40     inline std::list<PeerInfo*> getMasterServer() { return this->masterServerList; }
     40    inline std::list<PeerInfo*> getMasterServer() const { return this->masterServerList; }
    4141    /** @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; }
    4343    /** @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; }
    4545    /** @returns the client list */
    46     inline std::list<PeerInfo*> getClient() { return this->clientList; }
     46    inline std::list<PeerInfo*> getClient() const { return this->clientList; }
    4747
    4848
    4949    /** @returns the number of players */
    50     inline int getPlayerNumber() { return this->playerNumber; }
     50    inline int getPlayerNumber() const { return this->playerNumber; }
    5151    /** @returns the node type of this node */
    52     inline int getNodeType() { return this->peerInfo->nodeType; }
     52    inline int getNodeType() const { return this->peerInfo->nodeType; }
    5353    /** @returns the peer info of this node */
    54     inline PeerInfo* getPeerInfo() { return this->peerInfo; }
     54    inline PeerInfo* getPeerInfo() const { return this->peerInfo; }
    5555
    56     void debug(int depth);
     56    void debug(int depth) const;
    5757
    5858
Note: See TracChangeset for help on using the changeset viewer.