Domain name. More...
#include <domain_name.h>
Public Member Functions | |
domain_name () | |
Construct null. More... | |
domain_name (const std::string &v) | |
Construct from string. More... | |
bool | is_null () const |
Test if null. More... | |
domain_name | operator+ (const domain_name &rhs) const |
Append domain name and return result. More... | |
domain_name & | operator+= (const domain_name &rhs) |
Append domain name to this and return this. More... | |
const std::string & | string () const |
Get string. More... | |
Static Public Attributes | |
static const char | char_class [256] |
char class More... | |
static const char | SEPARATOR_CHAR |
separator ('.') More... | |
Private Attributes | |
std::string | string_ |
Friends | |
bool TECOMMONEXPORT | parse (std::string::const_iterator &first, std::string::const_iterator last, domain_name &v) |
Parse domain name, returning whether found or not and advancing first and setting name if found. More... | |
Domain name.
Syntax: "Labels" separated by '.'. Labels must start and end with a (ASCII) letter or digit, and have as interior characters only letters, digits, and hyphen. Not case sensitive, but canonical form is lower case.
Definition at line 40 of file domain_name.h.
te::common::uri::domain_name::domain_name | ( | ) |
Construct null.
te::common::uri::domain_name::domain_name | ( | const std::string & | v | ) |
Construct from string.
This will convert to lower case and check for valid chars. Note that the string cannot be empty, it must contain valid chars.
std::invalid_argument | if invalid |
|
inline |
Test if null.
Definition at line 48 of file domain_name.h.
|
inline |
Append domain name and return result.
Definition at line 51 of file domain_name.h.
domain_name& te::common::uri::domain_name::operator+= | ( | const domain_name & | rhs | ) |
Append domain name to this and return this.
|
inline |
Get string.
Definition at line 49 of file domain_name.h.
Referenced by te::common::uri::operator<<().
|
friend |
Parse domain name, returning whether found or not and advancing first and setting name if found.
Does not skip leading space.
|
static |
char class
Definition at line 58 of file domain_name.h.
|
static |
separator ('.')
Definition at line 57 of file domain_name.h.
|
private |
Definition at line 61 of file domain_name.h.