- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
GNet::AddressImp Class Reference

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

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

## 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)
static G::Strings | wildcards (const std::string &display_string)

## Detailed Description

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

Definition at line 36 of file gaddress_ipv4.cpp.

## Member Typedef Documentation

typedef sockaddr_in GNet::AddressImp::address_type

Definition at line 40 of file gaddress_ipv4.cpp.

typedef sockaddr GNet::AddressImp::general_type

Definition at line 39 of file gaddress_ipv4.cpp.

typedef sockaddr GNet::AddressImp::storage_type

Definition at line 41 of file gaddress_ipv4.cpp.

## Constructor & Destructor Documentation

GNet::AddressImp::AddressImp | ( | unsigned int | port | ) |
| explicit

Definition at line 118 of file gaddress_ipv4.cpp.

GNet::AddressImp::AddressImp | ( | const servent & | s | ) |
| explicit

Definition at line 153 of file gaddress_ipv4.cpp.

GNet::AddressImp::AddressImp | ( | const std::string & | s | ) |
| explicit

Definition at line 189 of file gaddress_ipv4.cpp.

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

Definition at line 178 of file gaddress_ipv4.cpp.

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

Definition at line 125 of file gaddress_ipv4.cpp.

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

Definition at line 132 of file gaddress_ipv4.cpp.

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

Definition at line 139 of file gaddress_ipv4.cpp.

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

Definition at line 146 of file gaddress_ipv4.cpp.

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

Definition at line 160 of file gaddress_ipv4.cpp.

GNet::AddressImp::AddressImp | ( | const AddressImp & | other | ) |

Definition at line 173 of file gaddress_ipv4.cpp.

## Member Function Documentation

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

Definition at line 234 of file gaddress_ipv4.cpp.

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

Definition at line 242 of file gaddress_ipv4.cpp.

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

Definition at line 337 of file gaddress_ipv4.cpp.

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

Definition at line 342 of file gaddress_ipv4.cpp.

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

Definition at line 347 of file gaddress_ipv4.cpp.

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

Definition at line 315 of file gaddress_ipv4.cpp.

References GNet::AddressImp::Sockaddr::specific.

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

Definition at line 324 of file gaddress_ipv4.cpp.

References GNet::AddressImp::Sockaddr::specific.

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

Definition at line 215 of file gaddress_ipv4.cpp.

bool GNet::AddressImp::validPort | ( | unsigned int | port | ) |
| static

Definition at line 249 of file gaddress_ipv4.cpp.

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

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

Definition at line 254 of file gaddress_ipv4.cpp.

References G::Str::splitIntoFields().

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

G::Strings GNet::AddressImp::wildcards | ( | const std::string & | display_string | ) |
| static

Definition at line 362 of file gaddress_ipv4.cpp.

References G_ASSERT, G::Str::isUInt(), G::Str::splitIntoFields(), and G::Str::toUInt().

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

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

- gaddress_ipv4.cpp