Public Member Functions | List of all members
Url Class Reference

An abstract Url (either http or https). More...

#include <Url.hpp>

Inheritance diagram for Url:
[legend]
Collaboration diagram for Url:
[legend]

Public Member Functions

size_t hashcode () const noexcept override
 Get the URI's hash code. More...
 
bool isRegularDirectory () const override
 Returns true if the URI points to a file directory. More...
 
bool isRegularFile () const override
 Returns true if the URI is a regular file. More...
 
std::string toRawString () const override
 Get a string representing the raw URI. More...
 
std::string toUriString () const override
 Get a string representing the URI, complete with scheme. More...
 
- Public Member Functions inherited from Uri
virtual ~Uri ()=default
 Destroy the URI instance. More...
 
virtual std::unique_ptr< Uriappend (const std::string &pathComponent) const =0
 Appends the path component to the supplied URI, returning a new URI. More...
 
virtual std::unique_ptr< ByteReadResourcebyteReadResource () const =0
 Get a byte read resource for the URI. More...
 
virtual std::unique_ptr< ByteWriteResourcebyteWriteResource ()=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< Uriclone () const =0
 Clone the concrete Uri. More...
 
std::shared_ptr< UricloneToShared () const
 Clone the concrete Uri to a shared pointer. More...
 
virtual void dispatch (UriDispatcher &visitor) const =0
 Visitor pattern dispatching. 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 std::unique_ptr< UriIteratoriterator () 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< RecursiveUriIteratorrecursiveIterator () const =0
 Get a recursive iterator. More...
 
virtual std::unique_ptr< Uriresolve (std::string_view path) const =0
 Resolve the relative or absolute path, in reference to the current URI. More...
 
virtual std::unique_ptr< Utf32To8WriteResourceutf32To8WriteResource ()=0
 Get a UTF-32 to UTF-8 write resource for the URI. More...
 
virtual std::unique_ptr< Utf8To32ReadResourceutf8To32ReadResource () const =0
 Get a UTF-8 to UTF-32 read resource for the URI. More...
 

Detailed Description

An abstract Url (either http or https).

Member Function Documentation

◆ hashcode()

size_t hashcode ( ) const
inlineoverridevirtualnoexcept

Get the URI's hash code.

Returns
the hash code

Implements Uri.

◆ isRegularDirectory()

bool isRegularDirectory ( ) const
inlineoverridevirtual

Returns true if the URI points to a file directory.

Returns
true if the URI points to a file directory

Implements Uri.

◆ isRegularFile()

bool isRegularFile ( ) const
inlineoverridevirtual

Returns true if the URI is a regular file.

Returns
true if the URI is a regular file

Implements Uri.

◆ toRawString()

std::string toRawString ( ) const
inlineoverridevirtual

Get a string representing the raw URI.

This may or may not be the same as the string returned by toUriString().

Returns
a string representing the raw URI

Implements Uri.

◆ toUriString()

std::string toUriString ( ) const
inlineoverridevirtual

Get a string representing the URI, complete with scheme.

Returns
a string representing the URI, complete with scheme

Implements Uri.


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