|
crawlserv++
[under development]
Application for crawling and analyzing textual content of websites.
|
RAII wrapper for Perl-compatible regular expression matches. More...
#include <PCREMatch.hpp>
Construction and Destruction | |
| PCREMatch (pcre2_match_data *setPtr) noexcept | |
| Constructor setting the underlying regular expression. More... | |
| virtual | ~PCREMatch () |
| Destructor clearing the underlying regular expression if necessary. More... | |
Getters | |
| pcre2_match_data * | get () noexcept |
| Gets a pointer to the underlying regular expression match. More... | |
| const pcre2_match_data * | getc () const noexcept |
| Gets a const pointer to the underlying regular expression match. More... | |
| bool | valid () const noexcept |
| Checks whether the underlying regular expression match is valid. More... | |
Cleanup | |
| void | clear () noexcept |
| Clears the underlying regular expression match if necessary. More... | |
Copy and Move | |
| PCREMatch (PCREMatch &)=delete | |
| Deleted copy constructor. More... | |
| PCREMatch & | operator= (PCREMatch &)=delete |
| Deleted copy assignment operator. More... | |
| PCREMatch (PCREMatch &&other) noexcept | |
| Move constructor. More... | |
| PCREMatch & | operator= (PCREMatch &&other) noexcept |
| Move assignment operator. More... | |
RAII wrapper for Perl-compatible regular expression matches.
Sets the RegEx match on construction and clears it on destruction, avoiding memory leaks.
At the moment, this class is used exclusively by the Query::Regex class.
For more information about the PCRE library used, visit its website.
|
inlineexplicitnoexcept |
Constructor setting the underlying regular expression.
| setPtr | The pointer to a regular expression match to be used or nullptr to create an invalid match. |
|
inlinevirtual |
Destructor clearing the underlying regular expression if necessary.
References clear().
|
delete |
Deleted copy constructor.
|
inlinenoexcept |
Move constructor.
Moves the regular expression match from the specified location into this instance of the class.
| other | The regular expression match to move from. |
|
inlinenoexcept |
Clears the underlying regular expression match if necessary.
Referenced by operator=(), and ~PCREMatch().
|
inlinenoexcept |
Gets a pointer to the underlying regular expression match.
Referenced by crawlservpp::Query::RegEx::getAll(), crawlservpp::Query::RegEx::getBool(), and crawlservpp::Query::RegEx::getFirst().
|
inlinenoexcept |
Gets a const pointer to the underlying regular expression match.
Deleted copy assignment operator.
Move assignment operator.
Moves the regular expression match from the specified location into this instance of the class.
| other | The regular expression match to move from. |
*this).References clear().
|
inlinenoexcept |
Checks whether the underlying regular expression match is valid.