Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9444 in orxonox.OLD


Ignore:
Timestamp:
Jul 25, 2006, 8:15:01 AM (18 years ago)
Author:
bensch
Message:

some cleanup

Location:
branches/proxy/src/lib/network
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/monitor/network_stats_widget.cc

    r9443 r9444  
    2020
    2121#include "multi_type.h"
     22
     23#include "shell_command.h"
     24
     25// SHELL_COMMAND(gui, NetworkMonitor, toggleGUI)
     26//  ->setAlias("ProxyGui");
     27
    2228
    2329HostWidget::HostWidget(const std::string& name, const IP& ip)
  • branches/proxy/src/lib/network/peer_info.cc

    r9406 r9444  
    5454
    5555
    56 std::string PeerInfo::getNodeTypeString()
     56const std::string& PeerInfo::getNodeTypeString()
    5757{
     58  return nodeNames[this->nodeType];
     59/*
    5860  switch( this->nodeType)
    5961  {
     
    6870  }
    6971
    70   return std::string("node is uninit");
     72  return std::string("node is uninit");*/
    7173}
     74
     75const std::string PeerInfo::nodeNames[] =
     76{
     77
     78  "maser server",
     79  "proxy server active",
     80  "proxy server passive",
     81  "client",
     82  "node is not initialized"
     83};
  • branches/proxy/src/lib/network/peer_info.h

    r9435 r9444  
    2727    inline bool isClient() const { return this->nodeType == NET_CLIENT; }
    2828
    29     std::string getNodeTypeString();
     29    const std::string& getNodeTypeString();
     30
    3031
    3132
     
    4142    int                 lastAckedState;          //!< last acked state synchronized state
    4243    int                 lastRecvedState;         //!< last received state
     44
     45    static const std::string nodeNames[];
     46
    4347};
    4448
  • branches/proxy/src/lib/network/zip.h

    r8623 r9444  
    2121
    2222//! A class for compressing/uncompressing packes.
    23 class Zip 
     23class Zip
    2424{
    2525  public:
     
    2727    /** @returns a Pointer to the only object of this Class */
    2828    inline static Zip* getInstance(void) { if (!singletonRef) singletonRef = new Zip();  return singletonRef; };
    29    
     29
    3030    int loadDictionary( std::string name );
    3131    int zip( byte * from, int fromLength, byte * to, int maxLength, int dict = 0 );
    3232    int unZip( byte * from, int fromLength, byte * to, int maxLength );
    33    
     33
    3434    int getDictCount(){ return dicts.size(); }
    3535
     
    3737    Zip();
    3838    static Zip* singletonRef;
    39    
     39
    4040    std::vector<DictionaryEntry> dicts;
    4141};
    4242
    43 #endif /* _PROTO_SINGLETON_H */
     43#endif /* _ZIP_H */
Note: See TracChangeset for help on using the changeset viewer.