RESTinio
|
Helper class for holding a unique instance of char array with target_path value. More...
#include <target_path_holder.hpp>
Public Types | |
using | data_t = std::unique_ptr< char[]> |
Public Member Functions | |
target_path_holder_t (string_view_t original_path) | |
Initializing constructor. More... | |
RESTINIO_NODISCARD string_view_t | view () const noexcept |
Get access to the value of target_path. More... | |
RESTINIO_NODISCARD data_t | giveout_data () noexcept |
Give out the value from holder. More... | |
Private Attributes | |
data_t | m_data |
Actual data with target_path. More... | |
std::size_t | m_size |
The length of target_path. More... | |
Helper class for holding a unique instance of char array with target_path value.
This class is a kind of std::unique_ptr<char[]> but it performs the normalization of target_path value in the constructor. All percent-encoded characters from unreserved set will be decoded into their normal representation. It means that target_path /%7Etest
will be automatically transformed into /~test
.
Definition at line 45 of file target_path_holder.hpp.
using restinio::router::impl::target_path_holder_t::data_t = std::unique_ptr<char[]> |
Definition at line 48 of file target_path_holder.hpp.
|
inline |
Initializing constructor.
Copies the value of original_path into a unique and dynamically allocated array of chars.
Basic URI normalization procedure is automatically performed if necessary.
Definition at line 62 of file target_path_holder.hpp.
|
inlinenoexcept |
Give out the value from holder.
Definition at line 99 of file target_path_holder.hpp.
|
inlinenoexcept |
Get access to the value of target_path.
Definition at line 86 of file target_path_holder.hpp.
|
private |
Actual data with target_path.
Definition at line 110 of file target_path_holder.hpp.
|
private |
The length of target_path.
Definition at line 112 of file target_path_holder.hpp.