uripp::ip_address Class Reference

List of all members.

Detailed Description

IP address.

Syntax: Note that leading 0's are not valid.

 IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
 dec-octet   = DIGIT                 ; 0-9
             | %x31-39 DIGIT         ; 10-99
             | "1" 2DIGIT            ; 100-199
             | "2" %x30-34 DIGIT     ; 200-249
             | "25" %x30-35          ; 250-255
 
See also:
http://tools.ietf.org/html/rfc3986#section-3.2.2


Public Member Functions

 ip_address ()
 ip_address (const std::string &v)
bool is_null () const
 Test if null (all 0's).
std::string string () const
 Calculate string.
std::ostream & operator<< (std::ostream &os) const
 Stream out.

Static Public Attributes

static const char SEPARATOR_CHAR
 separator ('.')

Friends

bool URIPP_API parse (std::string::const_iterator &first, std::string::const_iterator last, ip_address &v)
bool URIPP_API parse (std::string::const_iterator &first, std::string::const_iterator last, ipv6_address &v)


Constructor & Destructor Documentation

uripp::ip_address::ip_address (  ) 

Construct null.

uripp::ip_address::ip_address ( const std::string &  v  ) 

Construct from string. Note that the string cannot be empty, it must contain valid chars.

Exceptions:
std::invalid_argument if invalid


Friends And Related Function Documentation

bool URIPP_API parse ( std::string::const_iterator &  first,
std::string::const_iterator  last,
ipv6_address v 
) [friend]

Parse IP v6 address, returning whether found or not and advancing first and setting address if found. Does not skip leading space.

bool URIPP_API parse ( std::string::const_iterator &  first,
std::string::const_iterator  last,
ip_address v 
) [friend]

Parse IP address, returning whether found or not and advancing first and setting address if found. Does not skip leading space.


Generated on Wed May 13 09:06:22 2009 for uripp by  doxygen 1.4.7