Host Class Reference

#include <Host.h>

List of all members.

Public Member Functions

 Host ()
 Host (const std::string &name)
 Host (const IpAddress &address)
 Host (const hostent &host)
 Host (const Host &host)
Hostoperator= (const Host &host)
bool operator== (const Host &host) const
bool operator< (const Host &host) const
std::string getName () const
const std::vector< std::string > & getAliases () const
const std::vector< IpAddress > & getIpAddresses () const
bool isDefined () const
std::ostream & operator<< (std::ostream &stream) const

Static Public Member Functions

static const HostgetLocalhost ()

Protected Member Functions

void set (const std::string &name)
void set (const IpAddress &name)
void set (const hostent &host)

Static Protected Member Functions

static bool find (const std::string &name, struct hostent *data) throw ()
static bool find (const IpAddress &address, struct hostent *data) throw ()

Private Attributes

std::string hostName
std::vector< std::string > ipAliases
std::vector< IpAddressipAddresses

Static Private Attributes

static std::auto_ptr< HostipLocalhost


Detailed Description

TcpServer Socket library

Copyright (c) 2000 Jasen Plietz All rights reserved.

No warranties are extended. Use at your own risk.

To contact the author with suggestions or comments, use Jasen@plietz.net

Definition at line 36 of file Host.h.


Constructor & Destructor Documentation

Host::Host  ) 
 

Definition at line 78 of file Host.cpp.

Referenced by getLocalhost().

Host::Host const std::string &  name  ) 
 

Definition at line 48 of file Host.cpp.

References set().

Host::Host const IpAddress address  ) 
 

Definition at line 54 of file Host.cpp.

References set().

Host::Host const hostent &  host  ) 
 

Definition at line 83 of file Host.cpp.

References set().

Host::Host const Host host  ) 
 

Definition at line 89 of file Host.cpp.


Member Function Documentation

bool Host::find const IpAddress address,
struct hostent *  data
throw () [static, protected]
 

Definition at line 190 of file Host.cpp.

bool Host::find const std::string &  name,
struct hostent *  data
throw () [static, protected]
 

Definition at line 181 of file Host.cpp.

Referenced by set().

const std::vector< std::string > & Host::getAliases  )  const
 

Definition at line 101 of file Host.cpp.

References ipAliases.

const std::vector< IpAddress > & Host::getIpAddresses  )  const
 

Definition at line 60 of file Host.cpp.

References ipAddresses.

Referenced by IpAddress::setHostName().

const Host & Host::getLocalhost  )  [static]
 

Definition at line 125 of file Host.cpp.

References Host(), and ipLocalhost.

Referenced by IpAddress::getLocalIpAddress(), and NetworkStart().

std::string Host::getName  )  const
 

Definition at line 107 of file Host.cpp.

References hostName.

Referenced by isDefined(), operator<(), operator<<(), and operator==().

bool Host::isDefined  )  const
 

Definition at line 94 of file Host.cpp.

References getName().

Referenced by operator<<(), and IpAddress::setHostName().

bool Host::operator< const Host host  )  const
 

Definition at line 72 of file Host.cpp.

References getName().

std::ostream & Host::operator<< std::ostream &  stream  )  const
 

Definition at line 28 of file Host.cpp.

References getName(), ipAddresses, and isDefined().

Host & Host::operator= const Host host  ) 
 

Definition at line 113 of file Host.cpp.

References hostName, ipAddresses, and ipAliases.

bool Host::operator== const Host host  )  const
 

Definition at line 66 of file Host.cpp.

References getName().

void Host::set const hostent &  host  )  [protected]
 

Definition at line 167 of file Host.cpp.

References hostName, ipAddresses, and ipAliases.

void Host::set const IpAddress name  )  [protected]
 

Definition at line 154 of file Host.cpp.

References find(), NetworkException::invalid_host, set(), and NetworkException::throwNetworkException().

void Host::set const std::string &  name  )  [protected]
 

Definition at line 144 of file Host.cpp.

References find(), NetworkException::invalid_host, and NetworkException::throwNetworkException().

Referenced by Host(), and set().


Member Data Documentation

std::string Host::hostName [private]
 

Definition at line 80 of file Host.h.

Referenced by getName(), operator=(), and set().

std::vector< IpAddress > Host::ipAddresses [private]
 

Definition at line 82 of file Host.h.

Referenced by getIpAddresses(), operator<<(), operator=(), and set().

std::vector< std::string > Host::ipAliases [private]
 

Definition at line 81 of file Host.h.

Referenced by getAliases(), operator=(), and set().

std::auto_ptr< Host > Host::ipLocalhost [static, private]
 

TcpServer Socket library

Copyright (c) 2000 Jasen Plietz All rights reserved.

No warranties are extended. Use at your own risk.

To contact the author with suggestions or comments, use Jasen@plietz.net

Definition at line 83 of file Host.h.

Referenced by getLocalhost().


The documentation for this class was generated from the following files:
Generated on Tue Mar 28 09:10:16 2006 for Simple SOAP by  doxygen 1.4.6