32 #ifndef WRAPPER_URI_HPP_ 33 #define WRAPPER_URI_HPP_ 35 #include <uriparser/Uri.h> 71 [[nodiscard]] UriUriA *
get() noexcept;
72 [[nodiscard]]
const UriUriA *
getc()
const noexcept;
73 [[nodiscard]]
bool valid()
const noexcept;
95 URI(
URI&& other) =
default;
104 std::unique_ptr<UriUriA> ptr;
132 return this->ptr.get();
140 return this->ptr.get();
149 return this->ptr.operator bool();
163 this->ptr = std::make_unique<UriUriA>();
174 uriFreeUriMembersA(this->ptr.get());
void create()
Creates a new and empty URI.
Definition: URI.hpp:160
const UriUriA * getc() const noexcept
Gets a const pointer to the underlying URI structure.
Definition: URI.hpp:139
URI & operator=(URI &)=delete
Deleted copy assignment operator.
URI()=default
Default constructor.
Namespace for RAII wrappers and Wrapper::Database.
Definition: Database.hpp:109
bool valid() const noexcept
Checks whether the URI is valid.
Definition: URI.hpp:148
RAII wrapper for the RFC 3986 URI structure used by uriparser.
Definition: URI.hpp:57
UriUriA * get() noexcept
Gets a pointer to the underlying URI structure.
Definition: URI.hpp:131
void clear()
Frees the current URI.
Definition: URI.hpp:172
virtual ~URI()
Destructor freeing the URI if necessary.
Definition: URI.hpp:119