Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | Examples

Async::IpAddress Class Reference

A class for representing an IP address in an OS independent way. More...

#include <AsyncIpAddress.h>

List of all members.

Public Types

Public Member Functions

Friends


Detailed Description

A class for representing an IP address in an OS independent way.

Definition at line 104 of file AsyncIpAddress.h.


Member Typedef Documentation

typedef struct in_addr Async::IpAddress::Ip4Addr
 

The type for the OS specific representation of an IP address.

Definition at line 110 of file AsyncIpAddress.h.


Constructor & Destructor Documentation

Async::IpAddress::IpAddress void   ) 
 

Default constructor for the IpAddress class.

Async::IpAddress::IpAddress const std::string &  addr  ) 
 

Constructor for the IpAddress class.

Parameters:
addr The string representation of an IP address

Async::IpAddress::IpAddress const Ip4Addr addr  ) 
 

Constructor for the IpAddress class.

Parameters:
addr The IP address in OS specific representation

Async::IpAddress::IpAddress const IpAddress addr  )  [inline]
 

Copy contructor.

Parameters:
addr An IpAddress object to construct the new object from

Definition at line 133 of file AsyncIpAddress.h.

Async::IpAddress::~IpAddress void   )  [inline]
 

Destructor.

Definition at line 138 of file AsyncIpAddress.h.


Member Function Documentation

Ip4Addr Async::IpAddress::ip4Addr void   )  const [inline]
 

Return the IP address in OS specific representation.

Returns:
The IP address

Definition at line 144 of file AsyncIpAddress.h.

bool Async::IpAddress::isUnicast void   )  const
 

Check if this is a unicast IP address.

Returns:
Return true if this is a unicast address or false if it is some other type.

bool Async::IpAddress::isWithinSubet const std::string &  subnet  )  const
 

Check if the IP address is within the given netmask.

Parameters:
subnet The subnet to use in the check. The subnet should be given on the form a.b.c.d/m (e.g. 192.168.1.0/24).
Returns:
Return true if within the given subnet or false if it is not.

bool Async::IpAddress::operator!= const IpAddress rhs  )  const [inline]
 

Unequality operator.

Parameters:
rhs Right hand side expression
Returns:
Returns true if the right hand side object is unequal to this object, or else returns false.

Definition at line 196 of file AsyncIpAddress.h.

bool Async::IpAddress::operator< const IpAddress rhs  )  const [inline]
 

Less than operator.

Parameters:
rhs Right hand side expression
Returns:
Returns true if the right hand side object is less than this object, or else returns false.

Definition at line 207 of file AsyncIpAddress.h.

References m_addr.

IpAddress& Async::IpAddress::operator= const IpAddress rhs  )  [inline]
 

Assignment operator.

Parameters:
rhs The address object to assign to this object
Returns:
Returns the new IP address

Definition at line 173 of file AsyncIpAddress.h.

References m_addr.

bool Async::IpAddress::operator== const IpAddress rhs  )  const [inline]
 

Equality operator.

Parameters:
rhs Right hand side expression
Returns:
Returns true if the right hand side object is equal to this object, or else returns false.

Definition at line 185 of file AsyncIpAddress.h.

References m_addr.

std::string Async::IpAddress::toString void   )  const
 

Return the string representation of the IP address.

Returns:
The IP address string


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  os,
const Async::IpAddress ip
[friend]
 

Output stream operator.

Parameters:
os The stream to output data to
ip The IP address to output to the stream


The documentation for this class was generated from the following file:
Generated on Thu Dec 1 22:30:33 2005 for Async by  doxygen 1.4.4