URI scheme component. More...
#include <scheme.h>
Public Member Functions | |
bool | empty () const |
Test if null/empty. More... | |
bool | is_null () const |
Test if null/empty. More... | |
scheme () | |
Construct null. More... | |
scheme (const std::string &v) | |
Construct from string. More... | |
const std::string & | string () const |
Get string. More... | |
Private Attributes | |
std::string | string_ |
Friends | |
bool TECOMMONEXPORT | parse (std::string::const_iterator &first, std::string::const_iterator last, scheme &v, char *endc) |
Parse URI scheme, returning whether found or not and advancing first and setting scheme and end char if found. More... | |
URI scheme component.
Syntax:
scheme = ALPHA *( ALPHA | DIGIT | "+" | "-" | "." )
te::common::uri::scheme::scheme | ( | ) |
Construct null.
Definition at line 32 of file scheme.cpp.
Referenced by te::common::URL::setProtocol().
te::common::uri::scheme::scheme | ( | const std::string & | v | ) |
Construct from string.
This will convert to lower case and check for valid chars. Does not include the ":". Note that the string cannot be empty, it must contain chars that are valid for the scheme.
std::invalid_argument | if invalid |
Definition at line 33 of file scheme.cpp.
References parse.
|
inline |
|
inline |
Test if null/empty.
Definition at line 50 of file scheme.h.
Referenced by te::common::uri::uri::is_null(), and te::common::uri::uri::operator<<().
|
inline |
|
friend |
Parse URI scheme, returning whether found or not and advancing first and setting scheme and end char if found.
Does not skip leading space.
Definition at line 39 of file scheme.cpp.
Referenced by scheme().
|
private |
Definition at line 54 of file scheme.h.
Referenced by te::common::uri::parse().