HikoGUI
Select Version: ⚠️ This documents the main development branch of HikoGUI. It might differ from release versions.
A low latency retained GUI
|
#include <hikogui/path/URI.hpp>
Data Structures | |
class | authority_type |
class | path_type |
A path type. More... | |
Public Member Functions | |
constexpr | URI (URI const &) noexcept=default |
constexpr | URI (URI &&) noexcept=default |
constexpr URI & | operator= (URI const &) noexcept=default |
constexpr URI & | operator= (URI &&) noexcept=default |
constexpr | URI (std::string_view str) |
Construct a URI from a string. | |
constexpr | URI (std::string const &str) |
Construct a URI from a string. | |
constexpr | URI (const char *str) |
Construct a URI from a string. | |
constexpr bool | empty () const noexcept |
constexpr | operator bool () const noexcept |
constexpr std::optional< std::string > const & | scheme () const noexcept |
Get the scheme-component of the URI. | |
constexpr URI & | set_scheme (std::optional< std::string > const &rhs) |
Get the scheme-component of the URI. | |
constexpr std::optional< authority_type > const & | authority () const noexcept |
Get the authority-component of the URI. | |
constexpr URI & | set_authority (std::optional< authority_type > const &rhs) noexcept |
constexpr path_type const & | path () const noexcept |
constexpr URI & | set_path (path_type const &rhs) |
constexpr std::optional< std::string > | filename () const noexcept |
constexpr URI & | remove_filename () noexcept |
Remove the filename part of the path. | |
constexpr std::optional< std::string > const & | query () const noexcept |
Get the query-component of the URI. | |
constexpr URI & | set_query (std::optional< std::string > const &rhs) noexcept |
constexpr std::optional< std::string > const & | fragment () const noexcept |
Get the fragment-component of the URI. | |
constexpr URI & | set_fragment (std::optional< std::string > const &rhs) noexcept |
Static Public Member Functions | |
static constexpr std::string | decode (std::string_view rhs) |
URI percent-encoding decode function. | |
static constexpr std::string | decode (const_iterator first, const_iterator last) |
URI percent-encoding decode function. | |
template<char... Extras, typename It , typename ItEnd > | |
static constexpr std::string | encode (It first, ItEnd last) noexcept |
URI encode a component. | |
template<char... Extras, typename Range > | |
static constexpr std::string | encode (Range &&range) noexcept |
URI encode a component. | |
Friends | |
struct | std::hash< URI > |
constexpr friend std::string | to_string (URI const &rhs) noexcept |
std::ostream & | operator<< (std::ostream &lhs, URI const &rhs) noexcept |
constexpr friend bool | operator== (URI const &lhs, URI const &rhs) noexcept=default |
constexpr friend auto | operator<=> (URI const &lhs, URI const &rhs) noexcept=default |
constexpr friend URI | operator/ (URI const &base, URI const &ref) noexcept |
constexpr friend bool | operator== (URI const &lhs, std::string_view rhs) noexcept |
constexpr friend auto | operator<=> (URI const &lhs, std::string_view rhs) noexcept |
constexpr friend URI | operator/ (URI const &base, std::string_view ref) noexcept |
constexpr friend size_t | to_string_size (URI const &rhs) noexcept |
A Uniform Resource Identifier.
This class holds the URI separated and unencoded into it components:
|
inlineexplicitconstexpr |
|
inlineexplicitconstexpr |
|
inlineexplicitconstexpr |
|
inlineconstexprnoexcept |
Get the authority-component of the URI.
|
inlinestaticconstexpr |
URI percent-encoding decode function.
first | An iterator to the first character of a percent encoded string. |
last | An iterator to one beyond the last character of a percent encoded string. |
|
inlinestaticconstexpr |
URI percent-encoding decode function.
rhs | A percent-encoded string. |
|
inlinestaticconstexprnoexcept |
URI encode a component.
Extras | The extra characters beyond the unreserved characters to pct-encode. |
first | Iterator to a UTF-8 encoded string; a component or sub-component of a URI. |
last | Iterator pointing one beyond the UTF-8 encoded string. |
|
inlinestaticconstexprnoexcept |
|
inlineconstexprnoexcept |
Get the fragment-component of the URI.
|
inlineconstexprnoexcept |
Get the query-component of the URI.
|
inlineconstexprnoexcept |
Remove the filename part of the path.
|
inlineconstexprnoexcept |
Get the scheme-component of the URI.
|
inlineconstexpr |
Get the scheme-component of the URI.