A class to store the proxy information that must be used to access data located in URIs. More...
#include <URI.h>
Public Member Functions | |
std::string | fragment () const |
Retrieving the fragment. More... | |
std::string | host () const |
Retrieving the host. More... | |
bool | isValid () const |
Return if the given URI is valid or not. More... | |
URI & | operator= (const URI &other) |
Assingment operator. More... | |
std::string | password () const |
Retrieving the password information. More... | |
std::string | path () const |
Retrieving the path. More... | |
std::string | port () const |
Retrieving the port. More... | |
std::string | query () const |
Retrieving the query. More... | |
std::string | scheme () const |
Retrieving the scheme. More... | |
URI () | |
Default constructor. More... | |
const std::string & | uri () const |
Retrieving the full URI. More... | |
URI (const std::string &uri) | |
A constructor from a string. More... | |
URI (const URI &other) | |
Copy constructor. More... | |
std::string | user () const |
Retrieving the user information. More... | |
~URI () | |
Private Member Functions | |
void | encode () |
Check if the uri_ contains any invalid character and parse it to his hexadecimal value. More... | |
std::string | hexToLetter (int i) |
void | parse () |
Parse the URI stored in uri_ member. More... | |
void | swap (URI &other) |
Swap operation. More... | |
Private Attributes | |
std::unique_ptr< Impl > | m_pimpl |
A class to store the proxy information that must be used to access data located in URIs.
A class for representing an Uniform Resource Identifier (URI).
A class to handle the proxy authentication information.
te::core::URI::URI | ( | ) |
Default constructor.
|
explicit |
A constructor from a string.
This constructor check the URI enconding, then parse it and validate.
uri | A string with the URI to be parsed. |
URIException | when the given URI isn't valid. |
te::core::URI::URI | ( | const URI & | other | ) |
Copy constructor.
te::core::URI::~URI | ( | ) |
Default destructor.
|
private |
Check if the uri_ contains any invalid character and parse it to his hexadecimal value.
std::string te::core::URI::fragment | ( | ) | const |
Retrieving the fragment.
|
private |
std::string te::core::URI::host | ( | ) | const |
Retrieving the host.
bool te::core::URI::isValid | ( | ) | const |
|
private |
Parse the URI stored in uri_ member.
It uses regex to validate and parse the given URI.
After this, if the given URI is valid, the match_ member will have the references to all parts of the URI.
The regex split the URI by using named groups in regex, "(?<name>...)", so knowing the group name, you can require the corresponding group, from match_.
URIException | when the given URI isn't valid. |
std::string te::core::URI::password | ( | ) | const |
Retrieving the password information.
std::string te::core::URI::path | ( | ) | const |
Retrieving the path.
std::string te::core::URI::port | ( | ) | const |
Retrieving the port.
std::string te::core::URI::query | ( | ) | const |
Retrieving the query.
std::string te::core::URI::scheme | ( | ) | const |
Retrieving the scheme.
|
private |
Swap operation.
const std::string & te::core::URI::uri | ( | ) | const |
std::string te::core::URI::user | ( | ) | const |
Retrieving the user information.