reflex::AbstractMatcher::Iterator< T > Class Template Reference

updated Tue May 10 2022 by Robert van Engelen
 
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
reflex::AbstractMatcher::Iterator< T > Class Template Reference

AbstractMatcher::Iterator class for scanning, searching, and splitting input character sequences. More...

#include <absmatcher.h>

Public Types

typedef reflex::TypeOp< T >::NonConstType NonConstT
 Non-const AbstractMatcher type. More...
 
typedef reflex::TypeOp< T >::ConstType ConstT
 Const AbstractMatcher type. More...
 
typedef std::input_iterator_tag iterator_category
 Iterator iterator_category trait. More...
 
typedef T value_type
 Iterator value_type trait. More...
 
typedef std::ptrdiff_t difference_type
 Iterator difference_type trait. More...
 
typedef T * pointer
 Iterator pointer trait. More...
 
typedef T & reference
 Iterator reference trait. More...
 

Public Member Functions

 Iterator ()
 Construct an AbstractMatcher::Iterator such that Iterator() == AbstractMatcher::Operation(*this, method).end(). More...
 
 Iterator (const Iterator< NonConstT > &it)
 Copy constructor. More...
 
T & operator* () const
 AbstractMatcher::Iterator dereference. More...
 
T * operator-> () const
 AbstractMatcher::Iterator pointer. More...
 
bool operator== (const Iterator< ConstT > &rhs) const
 AbstractMatcher::Iterator equality. More...
 
bool operator!= (const Iterator< ConstT > &rhs) const
 AbstractMatcher::Iterator inequality. More...
 
Iteratoroperator++ ()
 AbstractMatcher::Iterator preincrement. More...
 
Iterator operator++ (int)
 AbstractMatcher::Iterator postincrement. More...
 
 Iterator (NonConstT *matcher, Method method)
 Construct an AbstractMatcher::Iterator to scan, search, or split an input character sequence. More...
 

Private Attributes

NonConstTmatcher_
 the matcher used by this iterator More...
 
Method method_
 the method for pattern matching by this iterator's matcher More...
 

Friends

class AbstractMatcher
 
class Iterator< typename reflex::TypeOp< T >::ConstType >
 
class Iterator< typename reflex::TypeOp< T >::NonConstType >
 

Detailed Description

template<typename T>
class reflex::AbstractMatcher::Iterator< T >

AbstractMatcher::Iterator class for scanning, searching, and splitting input character sequences.

Template Parameters
<T>AbstractMatcher or const AbstractMatcher

Member Typedef Documentation

template<typename T >
typedef reflex::TypeOp<T>::ConstType reflex::AbstractMatcher::Iterator< T >::ConstT
template<typename T >
typedef std::ptrdiff_t reflex::AbstractMatcher::Iterator< T >::difference_type

Iterator difference_type trait.

template<typename T >
typedef std::input_iterator_tag reflex::AbstractMatcher::Iterator< T >::iterator_category

Iterator iterator_category trait.

template<typename T >
typedef reflex::TypeOp<T>::NonConstType reflex::AbstractMatcher::Iterator< T >::NonConstT

Non-const AbstractMatcher type.

template<typename T >
typedef T* reflex::AbstractMatcher::Iterator< T >::pointer

Iterator pointer trait.

template<typename T >
typedef T& reflex::AbstractMatcher::Iterator< T >::reference

Iterator reference trait.

template<typename T >
typedef T reflex::AbstractMatcher::Iterator< T >::value_type

Iterator value_type trait.

Constructor & Destructor Documentation

template<typename T >
reflex::AbstractMatcher::Iterator< T >::Iterator ( )
inline

Construct an AbstractMatcher::Iterator such that Iterator() == AbstractMatcher::Operation(*this, method).end().

template<typename T >
reflex::AbstractMatcher::Iterator< T >::Iterator ( const Iterator< NonConstT > &  it)
inline

Copy constructor.

template<typename T >
reflex::AbstractMatcher::Iterator< T >::Iterator ( NonConstT matcher,
Method  method 
)
inline

Construct an AbstractMatcher::Iterator to scan, search, or split an input character sequence.

Parameters
matcheriterate over pattern matches with this matcher
methodmatch using method Const::SCAN, Const::FIND, or Const::SPLIT

Member Function Documentation

template<typename T >
bool reflex::AbstractMatcher::Iterator< T >::operator!= ( const Iterator< ConstT > &  rhs) const
inline

AbstractMatcher::Iterator inequality.

Returns
true if iterator does not equal RHS
template<typename T >
T& reflex::AbstractMatcher::Iterator< T >::operator* ( ) const
inline

AbstractMatcher::Iterator dereference.

Returns
(const) reference to the iterator's matcher
template<typename T >
Iterator& reflex::AbstractMatcher::Iterator< T >::operator++ ( )
inline

AbstractMatcher::Iterator preincrement.

Returns
reference to this iterator
template<typename T >
Iterator reflex::AbstractMatcher::Iterator< T >::operator++ ( int  )
inline

AbstractMatcher::Iterator postincrement.

Returns
iterator to current match
template<typename T >
T* reflex::AbstractMatcher::Iterator< T >::operator-> ( ) const
inline

AbstractMatcher::Iterator pointer.

Returns
(const) pointer to the iterator's matcher
template<typename T >
bool reflex::AbstractMatcher::Iterator< T >::operator== ( const Iterator< ConstT > &  rhs) const
inline

AbstractMatcher::Iterator equality.

Returns
true if iterator equals RHS

Friends And Related Function Documentation

template<typename T >
friend class AbstractMatcher
friend
template<typename T >
friend class Iterator< typename reflex::TypeOp< T >::ConstType >
friend
template<typename T >
friend class Iterator< typename reflex::TypeOp< T >::NonConstType >
friend

Member Data Documentation

template<typename T >
NonConstT* reflex::AbstractMatcher::Iterator< T >::matcher_
private

the matcher used by this iterator

template<typename T >
Method reflex::AbstractMatcher::Iterator< T >::method_
private

the method for pattern matching by this iterator's matcher


The documentation for this class was generated from the following file: