GNet::AddressImp Class Reference

A pimple-pattern implementation class for GNet::Address. More...

List of all members.

Public Types

typedef sockaddr general_type
typedef sockaddr_in address_type
typedef sockaddr storage_type

Public Member Functions

 AddressImp (unsigned int port)
 AddressImp (const servent &s)
 AddressImp (const std::string &s)
 AddressImp (const std::string &s, unsigned int port)
 AddressImp (unsigned int port, Address::Localhost)
 AddressImp (unsigned int port, Address::Broadcast)
 AddressImp (const hostent &h, unsigned int port)
 AddressImp (const hostent &h, const servent &s)
 AddressImp (const sockaddr *addr, size_t len)
 AddressImp (const AddressImp &other)
const sockaddr * raw () const
sockaddr * raw ()
unsigned int port () const
void setPort (unsigned int port)
bool same (const AddressImp &other) const
bool sameHost (const AddressImp &other) const
std::string displayString () const
std::string hostString () const

Static Public Member Functions

static bool validString (const std::string &s, std::string *reason_p=NULL)
static bool validPort (unsigned int port)

Classes

union  Sockaddr
 Used by GNet::AddressImp to cast between sockaddr and sockaddr_in. More...


Detailed Description

A pimple-pattern implementation class for GNet::Address.

Definition at line 35 of file gaddress_ipv4.cpp.


Member Typedef Documentation

Definition at line 38 of file gaddress_ipv4.cpp.

typedef sockaddr_in GNet::AddressImp::address_type

Definition at line 39 of file gaddress_ipv4.cpp.

Definition at line 40 of file gaddress_ipv4.cpp.


Constructor & Destructor Documentation

GNet::AddressImp::AddressImp ( unsigned int  port  )  [explicit]

Definition at line 117 of file gaddress_ipv4.cpp.

References setPort().

GNet::AddressImp::AddressImp ( const servent &  s  )  [explicit]

Definition at line 152 of file gaddress_ipv4.cpp.

GNet::AddressImp::AddressImp ( const std::string &  s  )  [explicit]

Definition at line 188 of file gaddress_ipv4.cpp.

GNet::AddressImp::AddressImp ( const std::string &  s,
unsigned int  port 
)

Definition at line 177 of file gaddress_ipv4.cpp.

References setPort().

GNet::AddressImp::AddressImp ( unsigned int  port,
Address::Localhost   
)

Definition at line 124 of file gaddress_ipv4.cpp.

References setPort().

GNet::AddressImp::AddressImp ( unsigned int  port,
Address::Broadcast   
)

Definition at line 131 of file gaddress_ipv4.cpp.

References setPort().

GNet::AddressImp::AddressImp ( const hostent &  h,
unsigned int  port 
)

Definition at line 138 of file gaddress_ipv4.cpp.

References setPort().

GNet::AddressImp::AddressImp ( const hostent &  h,
const servent &  s 
)

Definition at line 145 of file gaddress_ipv4.cpp.

GNet::AddressImp::AddressImp ( const sockaddr *  addr,
size_t  len 
)

Definition at line 159 of file gaddress_ipv4.cpp.

GNet::AddressImp::AddressImp ( const AddressImp other  ) 

Definition at line 172 of file gaddress_ipv4.cpp.

References m_inet.


Member Function Documentation

const sockaddr * GNet::AddressImp::raw (  )  const

Definition at line 341 of file gaddress_ipv4.cpp.

Referenced by GNet::Address::address().

sockaddr * GNet::AddressImp::raw (  ) 

Definition at line 346 of file gaddress_ipv4.cpp.

unsigned int GNet::AddressImp::port (  )  const

Definition at line 336 of file gaddress_ipv4.cpp.

Referenced by displayString(), and GNet::Address::port().

void GNet::AddressImp::setPort ( unsigned int  port  ) 

Definition at line 214 of file gaddress_ipv4.cpp.

References validPort().

Referenced by AddressImp(), and GNet::Address::setPort().

bool GNet::AddressImp::validString ( const std::string &  s,
std::string *  reason_p = NULL 
) [static]

Definition at line 253 of file gaddress_ipv4.cpp.

References G::Str::splitIntoFields().

Referenced by GNet::Address::validString().

bool GNet::AddressImp::validPort ( unsigned int  port  )  [static]

Definition at line 248 of file gaddress_ipv4.cpp.

Referenced by setPort(), and GNet::Address::validPort().

bool GNet::AddressImp::same ( const AddressImp other  )  const

Definition at line 314 of file gaddress_ipv4.cpp.

References m_inet.

Referenced by GNet::Address::operator==().

bool GNet::AddressImp::sameHost ( const AddressImp other  )  const

Definition at line 323 of file gaddress_ipv4.cpp.

References m_inet.

Referenced by GNet::Address::sameHost().

std::string GNet::AddressImp::displayString (  )  const

Definition at line 233 of file gaddress_ipv4.cpp.

References hostString(), and port().

Referenced by GNet::Address::displayString().

std::string GNet::AddressImp::hostString (  )  const


The documentation for this class was generated from the following file:

Generated on Fri Apr 18 15:56:13 2008 for E-MailRelay by  doxygen 1.5.5