IpAddress Class Reference

#include <IpAddress.h>

List of all members.

Public Member Functions

 IpAddress (unsigned long code=INADDR_ANY)
 IpAddress (const std::string &address)
 IpAddress (const in_addr &address)
 IpAddress (const IpAddress &address)
 ~IpAddress ()
IpAddressoperator= (const in_addr &address)
IpAddressoperator= (const IpAddress &address)
bool operator== (const IpAddress &address) const
bool operator< (const IpAddress &address) const
std::ostream & operator<< (std::ostream &stream) const
 operator in_addr () const
unsigned long toLong () const throw ()
void set (const std::string &string)
void set (unsigned long code) throw ()
void setHostName (const std::string &hostName)
bool isLocal () const
bool isDefined () const

Static Public Member Functions

static const IpAddressgetLocalIpAddress ()

Private Attributes

in_addr ipAddress

Static Private Attributes

static std::auto_ptr< IpAddresslocalIpAddress


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 34 of file IpAddress.h.


Constructor & Destructor Documentation

IpAddress::IpAddress unsigned long  code = INADDR_ANY  ) 
 

Definition at line 38 of file IpAddress.cpp.

References set().

Referenced by getLocalIpAddress().

IpAddress::IpAddress const std::string &  address  ) 
 

Definition at line 28 of file IpAddress.cpp.

References set(), and setHostName().

IpAddress::IpAddress const in_addr &  address  ) 
 

Definition at line 45 of file IpAddress.cpp.

IpAddress::IpAddress const IpAddress address  ) 
 

Definition at line 51 of file IpAddress.cpp.

IpAddress::~IpAddress  ) 
 

Definition at line 56 of file IpAddress.cpp.


Member Function Documentation

const IpAddress & IpAddress::getLocalIpAddress  )  [static]
 

Definition at line 132 of file IpAddress.cpp.

References Host::getLocalhost(), IpAddress(), and localIpAddress.

Referenced by isLocal(), and NetworkStart().

bool IpAddress::isDefined  )  const
 

Definition at line 108 of file IpAddress.cpp.

References ipAddress.

bool IpAddress::isLocal  )  const
 

Definition at line 96 of file IpAddress.cpp.

References getLocalIpAddress().

IpAddress::operator in_addr  )  const
 

Definition at line 102 of file IpAddress.cpp.

References ipAddress.

bool IpAddress::operator< const IpAddress address  )  const
 

Definition at line 76 of file IpAddress.cpp.

References toLong().

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

Definition at line 61 of file IpAddress.cpp.

References ipAddress, and toLong().

IpAddress & IpAddress::operator= const IpAddress address  ) 
 

Definition at line 89 of file IpAddress.cpp.

References ipAddress.

IpAddress & IpAddress::operator= const in_addr &  address  ) 
 

Definition at line 82 of file IpAddress.cpp.

References ipAddress.

bool IpAddress::operator== const IpAddress address  )  const
 

Definition at line 70 of file IpAddress.cpp.

References toLong().

void IpAddress::set unsigned long  code  )  throw ()
 

Definition at line 149 of file IpAddress.cpp.

void IpAddress::set const std::string &  string  ) 
 

Definition at line 122 of file IpAddress.cpp.

References NetworkException::invalid_address, ipAddress, and NetworkException::throwNetworkException().

Referenced by IpAddress().

void IpAddress::setHostName const std::string &  hostName  ) 
 

Definition at line 114 of file IpAddress.cpp.

References Host::getIpAddresses(), and Host::isDefined().

Referenced by IpAddress().

unsigned long IpAddress::toLong  )  const throw ()
 

Definition at line 156 of file IpAddress.cpp.

References ipAddress.

Referenced by operator<(), operator<<(), operator==(), and SocketAddress::setIpAddress().


Member Data Documentation

struct in_addr IpAddress::ipAddress [private]
 

Definition at line 79 of file IpAddress.h.

Referenced by isDefined(), operator in_addr(), operator<<(), operator=(), set(), and toLong().

std::auto_ptr< IpAddress > IpAddress::localIpAddress [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 82 of file IpAddress.h.

Referenced by getLocalIpAddress().


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