32 #ifndef WRAPPER_PCREMATCH_HPP_ 33 #define WRAPPER_PCREMATCH_HPP_ 66 explicit PCREMatch(pcre2_match_data * setPtr) noexcept;
73 [[nodiscard]] pcre2_match_data *
get() noexcept;
74 [[nodiscard]]
const pcre2_match_data *
getc()
const noexcept;
75 [[nodiscard]]
bool valid()
const noexcept;
81 void clear() noexcept;
103 pcre2_match_data * ptr{
nullptr};
161 return this->ptr !=
nullptr;
170 if(this->ptr !=
nullptr) {
171 pcre2_match_data_free(this->ptr);
224 this->ptr = other.ptr;
void clear() noexcept
Clears the underlying regular expression match if necessary.
Definition: PCREMatch.hpp:169
PCREMatch & operator=(PCREMatch &)=delete
Deleted copy assignment operator.
bool valid() const noexcept
Checks whether the underlying regular expression match is valid.
Definition: PCREMatch.hpp:160
const pcre2_match_data * getc() const noexcept
Gets a const pointer to the underlying regular expression match.
Definition: PCREMatch.hpp:150
RAII wrapper for Perl-compatible regular expression matches.
Definition: PCREMatch.hpp:61
PCREMatch(pcre2_match_data *setPtr) noexcept
Constructor setting the underlying regular expression.
Definition: PCREMatch.hpp:124
Namespace for RAII wrappers and Wrapper::Database.
Definition: Database.hpp:109
virtual ~PCREMatch()
Destructor clearing the underlying regular expression if necessary.
Definition: PCREMatch.hpp:127
pcre2_match_data * get() noexcept
Gets a pointer to the underlying regular expression match.
Definition: PCREMatch.hpp:140