URI fragment component. More...
#include <fragment.h>
Public Member Functions | |
bool | empty () const |
Test if null/empty. More... | |
std::string | encoding () const |
Calculate encoded string. More... | |
fragment () | |
Construct. More... | |
fragment (const std::string &v) | |
Construct from encoded string. More... | |
bool | is_null () const |
Test if null/empty. More... | |
const std::string & | string () const |
Get decoded string. More... | |
Private Attributes | |
std::string | string_ |
Friends | |
bool TECOMMONEXPORT | parse (std::string::const_iterator &first, std::string::const_iterator last, fragment &v, std::string *errs) |
Parse URI fragment, returning whether found or not and advancing first and setting fragment if found. More... | |
URI fragment component.
Syntax (see uri_path for additional definitions): String is pct-decoded after parsing.
fragment = *( pchar | "/" | "?" )
Definition at line 41 of file fragment.h.
te::common::uri::fragment::fragment | ( | ) |
Construct.
te::common::uri::fragment::fragment | ( | const std::string & | v | ) |
Construct from encoded string.
Note that this should not contain the leading '#'. See parse()
for less strict construction.
std::invalid_argument | if invalid encoding |
|
inline |
Test if null/empty.
Definition at line 49 of file fragment.h.
std::string te::common::uri::fragment::encoding | ( | ) | const |
Calculate encoded string.
Referenced by te::common::uri::operator<<().
|
inline |
Test if null/empty.
Definition at line 50 of file fragment.h.
|
inline |
Get decoded string.
Definition at line 51 of file fragment.h.
|
friend |
Parse URI fragment, returning whether found or not and advancing first and setting fragment if found.
Does not skip leading space.
If errs
is specified the following take place:
errs
. The string is used without decoding (i.e. assumes an unencoded '').
|
private |
Definition at line 55 of file fragment.h.