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.
◆ URI() [1/3]
◆ URI() [2/3]
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
-
◆ URI() [3/3]
te::core::URI::URI |
( |
const URI & |
other | ) |
|
◆ ~URI()
◆ encode()
void te::core::URI::encode |
( |
| ) |
|
|
private |
Check if the uri_ contains any invalid character and parse it to his hexadecimal value.
◆ fragment()
std::string te::core::URI::fragment |
( |
| ) |
const |
Retrieving the fragment.
- Returns
- Returns the URI fragment.
◆ hexToLetter()
std::string te::core::URI::hexToLetter |
( |
int |
i | ) |
|
|
private |
◆ host()
std::string te::core::URI::host |
( |
| ) |
const |
Retrieving the host.
- Returns
- Returns the URI host.
◆ isValid()
bool te::core::URI::isValid |
( |
| ) |
const |
Return if the given URI is valid or not.
- Returns
- Returns true if the given URI is valid.
◆ operator=()
URI& te::core::URI::operator= |
( |
const URI & |
other | ) |
|
◆ parse()
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
-
◆ password()
std::string te::core::URI::password |
( |
| ) |
const |
Retrieving the password information.
- Returns
- Returns the URI password information.
◆ path()
std::string te::core::URI::path |
( |
| ) |
const |
Retrieving the path.
- Returns
- Returns the URI path.
◆ port()
std::string te::core::URI::port |
( |
| ) |
const |
Retrieving the port.
- Returns
- Returns the URI port.
◆ query()
std::string te::core::URI::query |
( |
| ) |
const |
Retrieving the query.
- Returns
- Returns the URI query.
◆ scheme()
std::string te::core::URI::scheme |
( |
| ) |
const |
Retrieving the scheme.
- Returns
- Returns the URI scheme.
◆ swap()
void te::core::URI::swap |
( |
URI & |
other | ) |
|
|
private |
◆ uri()
const std::string& te::core::URI::uri |
( |
| ) |
const |
Retrieving the full URI.
- Returns
- Returns the complete URI.
◆ user()
std::string te::core::URI::user |
( |
| ) |
const |
Retrieving the user information.
- Returns
- Returns the URI user information.
◆ m_pimpl
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