An abstract universal resource identifier. More...
#include <Uri.hpp>
Public Member Functions | |
virtual | ~Uri ()=default |
Destroy the URI instance. More... | |
virtual std::unique_ptr< Uri > | append (const std::string &pathComponent) const =0 |
Appends the path component to the supplied URI, returning a new URI. More... | |
virtual std::unique_ptr< ByteReadResource > | byteReadResource () const =0 |
Get a byte read resource for the URI. More... | |
virtual std::unique_ptr< ByteWriteResource > | byteWriteResource ()=0 |
Get a byte write resource for the URI. More... | |
virtual bool | canReadFrom () const =0 |
Can data be read from the URI via a read resource. More... | |
virtual bool | canWriteTo () const =0 |
Can data be written to the URI via a write resource. More... | |
virtual std::unique_ptr< Uri > | clone () const =0 |
Clone the concrete Uri. More... | |
std::shared_ptr< Uri > | cloneToShared () const |
Clone the concrete Uri to a shared pointer. More... | |
virtual void | dispatch (UriDispatcher &visitor) const =0 |
Visitor pattern dispatching. More... | |
virtual size_t | hashcode () const noexcept=0 |
Get the URI's hash code. More... | |
virtual bool | isIterable () const =0 |
Does the URI have a non-recursive iterator (examples: file and zip archive URIs). More... | |
virtual bool | isRecursivelyIterable () const =0 |
Does the URI have a recursive iterator (examples: file and zip archive URIs). More... | |
virtual bool | isRegularDirectory () const =0 |
Returns true if the URI points to a file directory. More... | |
virtual bool | isRegularFile () const =0 |
Returns true if the URI is a regular file. More... | |
virtual std::unique_ptr< UriIterator > | iterator () const =0 |
Get a (non-recursive) iterator. More... | |
virtual bool | operator== (const Uri &rhs) const =0 |
Compare the supplied URI to the current URI. More... | |
virtual std::unique_ptr< RecursiveUriIterator > | recursiveIterator () const =0 |
Get a recursive iterator. More... | |
virtual std::unique_ptr< Uri > | resolve (std::string_view path) const =0 |
Resolve the relative or absolute path, in reference to the current URI. More... | |
virtual std::string | toRawString () const =0 |
Get a string representing the raw URI. More... | |
virtual std::string | toUriString () const =0 |
Get a string representing the URI, complete with scheme. More... | |
virtual std::unique_ptr< Utf32To8WriteResource > | utf32To8WriteResource ()=0 |
Get a UTF-32 to UTF-8 write resource for the URI. More... | |
virtual std::unique_ptr< Utf8To32ReadResource > | utf8To32ReadResource () const =0 |
Get a UTF-8 to UTF-32 read resource for the URI. More... | |
An abstract universal resource identifier.
|
virtualdefault |
Destroy the URI instance.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
Clone the concrete Uri to a shared pointer.
|
pure virtual |
|
pure virtualnoexcept |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Resolve the relative or absolute path, in reference to the current URI.
If the supplied path contains a scheme prefix, the URI fromString function will be called to create a new unrelated URI instance.
This method will determine the base path to use by applying the following rules.
path | a relative or absolute path, or a full URI |
Implemented in ZipFile, File, StringUri, Http, Https, and ZipEntry.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |