|
crawlserv++
[under development]
Application for crawling and analyzing textual content of websites.
|
RAII wrapper for the RFC 3986 URI structure used by uriparser. More...
#include <URI.hpp>
Construction and Destruction | |
| URI ()=default | |
| Default constructor. More... | |
| virtual | ~URI () |
| Destructor freeing the URI if necessary. More... | |
Getters | |
| UriUriA * | get () noexcept |
| Gets a pointer to the underlying URI structure. More... | |
| const UriUriA * | getc () const noexcept |
| Gets a const pointer to the underlying URI structure. More... | |
| bool | valid () const noexcept |
| Checks whether the URI is valid. More... | |
Creation and Cleanup | |
| void | create () |
| Creates a new and empty URI. More... | |
| void | clear () |
| Frees the current URI. More... | |
Copy and Move | |
| URI (URI &)=delete | |
| Deleted copy constructor. More... | |
| URI & | operator= (URI &)=delete |
| Deleted copy assignment operator. More... | |
| URI (URI &&other)=default | |
| Default move constructor. More... | |
| URI & | operator= (URI &&other)=default |
| Default move assignment operator. More... | |
RAII wrapper for the RFC 3986 URI structure used by uriparser.
Creates a uriparser structure on request and automatically frees it on destruction, avoiding memory leaks.
At the moment, this class is used exclusively by Parsing::URI.
For more information about the uriparser API, see its GitHub repository.
|
default |
Default constructor.
|
inlinevirtual |
Destructor freeing the URI if necessary.
Has no effect if no URI has been created.
References clear().
|
delete |
Deleted copy constructor.
|
default |
Default move constructor.
|
inline |
Frees the current URI.
Frees and resets the underlying URI structure.
Has no effect if no URI has been created.
Referenced by create(), crawlservpp::Parsing::URI::parseLink(), and ~URI().
|
inline |
Creates a new and empty URI.
Frees the underlying URI structure beforehand, if necessary.
References clear().
Referenced by crawlservpp::Parsing::URI::makeAbsolute(), crawlservpp::Parsing::URI::parseLink(), and crawlservpp::Parsing::URI::setCurrentOrigin().
|
inlinenoexcept |
Gets a pointer to the underlying URI structure.
Referenced by crawlservpp::Parsing::URI::makeAbsolute(), crawlservpp::Parsing::URI::parseLink(), and crawlservpp::Parsing::URI::setCurrentOrigin().
|
inlinenoexcept |
Gets a const pointer to the underlying URI structure.
Referenced by crawlservpp::Parsing::URI::getSubUri(), crawlservpp::Parsing::URI::isSameDomain(), crawlservpp::Parsing::URI::makeAbsolute(), and crawlservpp::Parsing::URI::parseLink().
|
inlinenoexcept |
Checks whether the URI is valid.
Referenced by crawlservpp::Parsing::URI::getSubUri(), crawlservpp::Parsing::URI::isSameDomain(), and crawlservpp::Parsing::URI::makeAbsolute().