Doxygen
|
Class to iterate through matches. More...
#include <src/regex.h>
Public Types | |
using | value_type = Match |
using | difference_type = std::ptrdiff_t |
using | pointer = value_type* |
using | reference = value_type& |
using | iterator_category = std::forward_iterator_tag |
Public Member Functions | |
Iterator () | |
Creates an end-of-sequence iterator. | |
Iterator (std::string_view str, const Ex &re, size_t pos=0) | |
Creates an iterator for input string str, using regular expression re to search. | |
Iterator (std::string &&str, const Ex &re)=delete | |
Iterator (const std::string &str, Ex &&re)=delete | |
Iterator (std::string &&str, Ex &&re)=delete | |
bool | operator== (const Iterator &rhs) const |
Returns true if the iterators point to the same match (or both are end-of-sequence iterators) | |
bool | operator!= (const Iterator &rhs) const |
Returns true if the iterators are not pointing to the same match. | |
const value_type & | operator* () const |
Returns a reference to the current match. | |
const value_type * | operator-> () const |
Returns a pointer to the current match. | |
Iterator & | operator++ () |
Advances the iterator to the next match. |
Private Member Functions | |
void | findNext () |
Private Attributes | |
std::string_view | m_str |
const Ex * | m_re = nullptr |
size_t | m_pos = std::string::npos |
Match | m_match |
using reg::Iterator::difference_type = std::ptrdiff_t |
using reg::Iterator::iterator_category = std::forward_iterator_tag |
using reg::Iterator::pointer = value_type* |
using reg::Iterator::reference = value_type& |
using reg::Iterator::value_type = Match |
|
inline |
Creates an end-of-sequence iterator.
Definition at line 241 of file regex.h.
Referenced by operator!=(), operator++(), and operator==().
|
inline |
|
delete |
|
delete |
|
delete |
|
inlineprivate |
Definition at line 271 of file regex.h.
References m_match, m_pos, m_re, and m_str.
Referenced by Iterator(), and operator++().
|
inline |
Returns true if the iterators are not pointing to the same match.
Definition at line 259 of file regex.h.
References Iterator(), and m_pos.
|
inline |
|
inline |
Advances the iterator to the next match.
Definition at line 268 of file regex.h.
References findNext(), and Iterator().
|
inline |
|
inline |
Returns true if the iterators point to the same match (or both are end-of-sequence iterators)
Definition at line 256 of file regex.h.
References Iterator(), and m_pos.
|
private |
Definition at line 286 of file regex.h.
Referenced by findNext(), operator*(), and operator->().
|
private |
Definition at line 285 of file regex.h.
Referenced by findNext(), Iterator(), operator!=(), and operator==().
|
private |
Definition at line 284 of file regex.h.
Referenced by findNext(), and Iterator().
|
private |
Definition at line 283 of file regex.h.
Referenced by findNext(), and Iterator().