A class for representing an Uniform Resource Identifier (URI).
More...
#include <URI.h>
A class for representing an Uniform Resource Identifier (URI).
Definition at line 49 of file URI.h.
te::core::URI::URI |
( |
const std::string & |
uri | ) |
|
|
explicit |
A constructor from a string.
This constructor check the URI enconding, then parse it and validate.
- Parameters
-
uri | A string with the URI to be parsed. |
- Exceptions
-
te::core::URI::URI |
( |
const URI & |
other | ) |
|
void te::core::URI::encode |
( |
| ) |
|
|
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.
- Returns
- Returns the URI fragment.
std::string te::core::URI::hexToLetter |
( |
int |
i | ) |
|
|
private |
std::string te::core::URI::host |
( |
| ) |
const |
Retrieving the host.
- Returns
- Returns the URI host.
bool te::core::URI::isValid |
( |
| ) |
const |
Return if the given URI is valid or not.
- Returns
- Returns true if the given URI is valid.
URI& te::core::URI::operator= |
( |
const URI & |
other | ) |
|
void te::core::URI::parse |
( |
| ) |
|
|
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_.
- Exceptions
-
std::string te::core::URI::password |
( |
| ) |
const |
Retrieving the password information.
- Returns
- Returns the URI password information.
std::string te::core::URI::path |
( |
| ) |
const |
Retrieving the path.
- Returns
- Returns the URI path.
std::string te::core::URI::port |
( |
| ) |
const |
Retrieving the port.
- Returns
- Returns the URI port.
std::string te::core::URI::query |
( |
| ) |
const |
Retrieving the query.
- Returns
- Returns the URI query.
std::string te::core::URI::scheme |
( |
| ) |
const |
Retrieving the scheme.
- Returns
- Returns the URI scheme.
void te::core::URI::swap |
( |
URI & |
other | ) |
|
|
private |
const std::string& te::core::URI::uri |
( |
| ) |
const |
Retrieving the full URI.
- Returns
- Returns the complete URI.
std::string te::core::URI::user |
( |
| ) |
const |
Retrieving the user information.
- Returns
- Returns the URI user information.
std::unique_ptr<Impl> te::core::URI::m_pimpl |
|
private |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/src/terralib/core/uri/URI.h