HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends
hi::v1::URI::path_type Class Reference

#include <hikogui/path/URI.hpp>

Inheritance diagram for hi::v1::URI::path_type:
std::vector< std::string >

Public Member Functions

constexpr path_type (path_type const &) noexcept=default
 
constexpr path_type (path_type &&) noexcept=default
 
constexpr path_typeoperator= (path_type const &) noexcept=default
 
constexpr path_typeoperator= (path_type &&) noexcept=default
 
constexpr path_type (std::string_view str) noexcept
 
constexpr bool absolute () const noexcept
 
constexpr bool double_absolute () const noexcept
 
constexpr bool is_root () const noexcept
 
constexpr std::optional< std::stringfilename () const noexcept
 
constexpr path_typeremove_filename () noexcept
 Remove the filename part of the path.
 
constexpr bool holds_invariant () const noexcept
 
- Public Member Functions inherited from std::vector< std::string >
std::string push_back (std::string ... args)
 
std::string crbegin (std::string ... args)
 
std::string erase (std::string ... args)
 
std::string data (std::string ... args)
 
std::string insert (std::string ... args)
 
std::string pop_back (std::string ... args)
 
std::string shrink_to_fit (std::string ... args)
 
std::string back (std::string ... args)
 
std::string end (std::string ... args)
 
std::string resize (std::string ... args)
 
std::string emplace_back (std::string ... args)
 
std::string size (std::string ... args)
 
std::string cbegin (std::string ... args)
 
std::string front (std::string ... args)
 
std::string ~vector (std::string ... args)
 
std::string rbegin (std::string ... args)
 
std::string crend (std::string ... args)
 
std::string assign (std::string ... args)
 
std::string operator= (std::string ... args)
 
std::string vector (std::string ... args)
 
std::string reserve (std::string ... args)
 
std::string capacity (std::string ... args)
 
std::string empty (std::string ... args)
 
std::string cend (std::string ... args)
 
std::string swap (std::string ... args)
 
std::string max_size (std::string ... args)
 
std::string rend (std::string ... args)
 
std::string get_allocator (std::string ... args)
 
std::string clear (std::string ... args)
 
std::string at (std::string ... args)
 
std::string emplace (std::string ... args)
 
std::string operator[] (std::string ... args)
 
std::string begin (std::string ... args)
 

Static Public Member Functions

static constexpr std::vector< std::stringparse (std::string_view str)
 

Friends

constexpr friend path_type merge (path_type base, path_type const &ref, bool base_has_authority) noexcept
 
constexpr friend path_type remove_dot_segments (path_type path) noexcept
 
constexpr friend size_t to_string_size (path_type const &rhs) noexcept
 
constexpr friend std::string to_string (path_type const &rhs, bool has_scheme=false) noexcept
 Convert the URI path component to a string.
 

Additional Inherited Members

- Data Fields inherited from std::vector< std::string >
std::string elements
 STL member.
 

Detailed Description

A path type.

A path is a vector of path-segments:

Path string Segment list
"" []
"/" ["", ""]
"filename" ["filename"]
"/filename" ["", "filename"]
"dirname/" ["dirname", ""]
"/dirname/" ["", "dirname", ""]
"/dirname/filename" ["", "dirname", "filename"]
"." [".", ""]
"/." ["", ".", ""]
"./" [".", ""]
"/./" ["", ".", ""]
"/./." ["", ".", ".", ""]
".." ["..", ""]
"/.." ["", "..", ""]
"../" ["..", ""]
"/../" ["", "..", ""]
"/../.." ["", "..", ".", ""]

Member Function Documentation

◆ remove_filename()

constexpr path_type & hi::v1::URI::path_type::remove_filename ( )
inlineconstexprnoexcept

Remove the filename part of the path.

Note
No change when the path does not contain a filename.
Returns
A reference to this.

Friends And Related Symbol Documentation

◆ remove_dot_segments

constexpr friend path_type remove_dot_segments ( path_type path)
friend
Path List Result Path Result List
".." ["..", ""] "" [""]
"/.." ["", "..", ""] "" [""]
"foo/.." ["foo", "..", ""] "" [""]
"/foo/.." ["", "foo", "..", ""] "/" ["", ""]
"baz/foo/.." ["baz", "foo", "..", ""] "baz/" ["baz", ""]
"/baz/foo/.." ["", "baz", "foo", "..", ""] "/baz/" ["", "baz", ""]

| | | "../" | ["..", ""] | "" | [""] "/../" | ["", "..", ""] | "" | [""] "foo/../" | ["foo", "..", ""] | "" | [""] "/foo/../" | ["", "foo", "..", ""] | "/" | ["", ""] "baz/foo/../" | ["baz", "foo", "..", ""] | "baz/" | ["baz", ""] "/baz/foo/../" | ["", "baz", "foo", "..", ""] | "/baz/" | ["", "baz", ""] | | | "../bar" | ["..", "bar"] | "bar" | ["bar"] "/../bar" | ["", "..", "bar"] | "bar" | ["bar"] "foo/../bar" | ["foo", "..", "bar"] | "bar" | ["bar"] "/foo/../bar" | ["", "foo", "..", "bar"] | "/bar" | ["", "bar"] "baz/foo/../bar" | ["baz", "foo", "..", "bar"] | "baz/bar" | ["baz", "bar"] "/baz/foo/../bar" | ["", "baz", "foo", "..", "bar"] | "/baz/bar" | ["", "baz", "bar"]

◆ to_string

constexpr friend std::string to_string ( path_type const & rhs,
bool has_scheme = false )
friend

Convert the URI path component to a string.

Parameters
rhsThe URI path component.
has_schemeIf true than the first segment may contain a ':' without percent encoding.
Returns
The path component converted to a string.

The documentation for this class was generated from the following file: