31 |
|
static unsigned count; |
32 |
|
static WSADATA data; |
33 |
|
#endif |
34 |
< |
string host; |
35 |
< |
string name; |
36 |
< |
struct in_addr address; |
37 |
< |
string platform; |
34 |
> |
std::string host; |
35 |
> |
std::string name; |
36 |
> |
struct ::in_addr address; |
37 |
> |
std::string platform; |
38 |
|
public: |
39 |
< |
Host(const string& host, const string& name = "", const string& address = |
40 |
< |
"", const string& platform = "Unknown"); |
39 |
> |
Host(const std::string& host, const std::string& name = "", const std::string& address = "", const std::string& platform = "Unknown"); |
40 |
|
~Host(); |
41 |
< |
void setHost(const string& host) { this->host = host; } |
42 |
< |
void setName(const string& name, bool lookup = false); |
43 |
< |
void setAddress(const string& address, bool lookup = false); |
44 |
< |
void setPlatform(const string& platform) { this->platform = platform; } |
45 |
< |
string getHost() const { return host; } |
46 |
< |
string getName() const { return name; } |
47 |
< |
string getAddress() const { return inet_ntoa(address); } |
48 |
< |
string getPlatform() const { return platform; } |
41 |
> |
void setHost(const std::string& host) { this->host = host; } |
42 |
> |
void setName(const std::string& name, bool lookup = false); |
43 |
> |
void setAddress(const std::string& address, bool lookup = false); |
44 |
> |
void setPlatform(const std::string& platform) { this->platform = platform; } |
45 |
> |
std::string getHost() const { return host; } |
46 |
> |
std::string getName() const { return name; } |
47 |
> |
std::string getAddress() const { return inet_ntoa(address); } |
48 |
> |
std::string getPlatform() const { return platform; } |
49 |
|
bool operator==(const Host& host) const; |
50 |
|
bool operator!=(const Host& host) const { return !(*this == host); } |
51 |
|
bool operator<(const Host& host) const { return this->host < host.host; } |