ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/HostUpdate/Host.hpp
(Generate patch)

Comparing HostUpdate/Host.hpp (file contents):
Revision 12 by Douglas Thrift, 2003-11-06T23:43:01-08:00 vs.
Revision 22 by Douglas Thrift, 2003-11-10T23:58:38-08:00

# Line 13 | Line 13
13  
14   #include <sys/socket.h>
15   #include <netdb.h>
16 + #include <netinet/in.h>
17 + #include <arpa/inet.h>
18  
19   #else
20  
21   #include <Winsock2.h>
20 #include <Ws2tcpip.h>
22  
23   typedef unsigned long in_addr_t;
24  
# Line 32 | Line 33 | private:
33   #endif
34          string host;
35          string name;
36 <        struct in_addr* address;
36 >        struct in_addr address;
37          string platform;
38   public:
39          Host(const string& host, const string& name = "", const string& address =
# Line 44 | Line 45 | public:
45          void setPlatform(const string& platform) { this->platform = platform; }
46          string getHost() const { return host; }
47          string getName() const { return name; }
48 <        string getAddress() const { return inet_ntoa(*address); }
48 >        string getAddress() const { return inet_ntoa(address); }
49          string getPlatform() const { return platform; }
50 <        void operator++();
51 <        void operator++(int) { operator++(); }
52 <        void operator--();
53 <        void operator--(int) { operator--(); }
50 >        bool operator==(const Host& host) const;
51 >        bool operator!=(const Host& host) const { return !(*this == host); }
52 >        bool operator<(const Host& host) const { return this->host < host.host; }
53 >        bool operator>(const Host& host) const { return this->host > host.host; }
54 >        Host operator++();
55 >        Host operator++(int);
56 >        Host operator--();
57 >        Host operator--(int);
58   };
59  
60   #endif // _Host_hpp_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines