Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Related Symbols | List of all members
Teuchos::FilteredIterator< IteratorType, Predicate > Class Template Reference

C++ Standard Library compatable filtered iterator. More...

#include <Teuchos_FilteredIterator.hpp>

Related Symbols

(Note that these are not member symbols.)

template<class IteratorType , class Predicate >
bool operator== (const FilteredIterator< IteratorType, Predicate > &itr1, const FilteredIterator< IteratorType, Predicate > &itr2)
 itr1 == itr2.
 
template<class IteratorType , class Predicate >
bool operator!= (const FilteredIterator< IteratorType, Predicate > &itr1, const FilteredIterator< IteratorType, Predicate > &itr2)
 itr1 != itr2.
 
template<class IteratorType , class Predicate >
std::ostream & operator<< (std::ostream &out, const FilteredIterator< IteratorType, Predicate > &itr)
 ostream operator.
 

public typedefs

typedef std::bidirectional_iterator_tag iterator_category
 
typedef std::iterator_traits< IteratorType >::value_type value_type
 
typedef std::iterator_traits< IteratorType >::reference reference
 
typedef std::iterator_traits< IteratorType >::pointer pointer
 
typedef std::iterator_traits< IteratorType >::difference_type difference_type
 

Implementation access

IteratorType current_
 
IteratorType begin_
 
IteratorType end_
 
Predicate pred_
 
IteratorType current () const
 
IteratorType begin () const
 
IteratorType end () const
 
Predicate pred () const
 
void advanceForwardToValid ()
 
void advanceBackwardToValid ()
 
void assertNotIterateForwardPastEnd ()
 
void assertNotIterateBackwardPastBegin ()
 

Constructors.

 FilteredIterator ()
 construct to a null iterator.
 
 FilteredIterator (IteratorType current_in, IteratorType begin_in, IteratorType end_in, Predicate pred_in=Predicate())
 Construct with iterator and range.
 
template<class IteratorType2 , class Predicate2 >
 FilteredIterator (const FilteredIterator< IteratorType2, Predicate2 > &rhs)
 Convert type of iterators (mainly for non-const to const).
 
template<class IteratorType2 , class Predicate2 >
FilteredIteratoroperator= (const FilteredIterator< IteratorType2, Predicate2 > &rhs)
 Assign different types of iterators (mainly for non-const to const).
 

Access

reference operator* () const
 itr*
 
pointer operator-> () const
 itr->member
 

Incrementation

FilteredIteratoroperator++ ()
 ++itr
 
const FilteredIterator operator++ (int)
 itr++
 
FilteredIteratoroperator-- ()
 –itr
 
const FilteredIterator operator-- (int)
 itr–
 

Detailed Description

template<class IteratorType, class Predicate>
class Teuchos::FilteredIterator< IteratorType, Predicate >

C++ Standard Library compatable filtered iterator.

Provides a bidirectional iterator providing a filtered view of an underlying iterator (defined by a predicate policy object).

Definition at line 60 of file Teuchos_FilteredIterator.hpp.

Member Typedef Documentation

◆ iterator_category

typedef std::bidirectional_iterator_tag Teuchos::FilteredIterator< IteratorType, Predicate >::iterator_category

Definition at line 67 of file Teuchos_FilteredIterator.hpp.

◆ value_type

typedef std::iterator_traits<IteratorType>::value_type Teuchos::FilteredIterator< IteratorType, Predicate >::value_type

Definition at line 69 of file Teuchos_FilteredIterator.hpp.

◆ reference

typedef std::iterator_traits<IteratorType>::reference Teuchos::FilteredIterator< IteratorType, Predicate >::reference

Definition at line 71 of file Teuchos_FilteredIterator.hpp.

◆ pointer

typedef std::iterator_traits<IteratorType>::pointer Teuchos::FilteredIterator< IteratorType, Predicate >::pointer

Definition at line 73 of file Teuchos_FilteredIterator.hpp.

◆ difference_type

typedef std::iterator_traits<IteratorType>::difference_type Teuchos::FilteredIterator< IteratorType, Predicate >::difference_type

Definition at line 75 of file Teuchos_FilteredIterator.hpp.

Constructor & Destructor Documentation

◆ FilteredIterator() [1/3]

Teuchos::FilteredIterator< IteratorType, Predicate >::FilteredIterator ( )
inline

construct to a null iterator.

Definition at line 83 of file Teuchos_FilteredIterator.hpp.

◆ FilteredIterator() [2/3]

Teuchos::FilteredIterator< IteratorType, Predicate >::FilteredIterator ( IteratorType current_in,
IteratorType begin_in,
IteratorType end_in,
Predicate pred_in = Predicate() )
inline

Construct with iterator and range.

Todo
Assert valid range for random-access iterators.

Definition at line 88 of file Teuchos_FilteredIterator.hpp.

◆ FilteredIterator() [3/3]

Convert type of iterators (mainly for non-const to const).

Definition at line 95 of file Teuchos_FilteredIterator.hpp.

Member Function Documentation

◆ operator=()

Assign different types of iterators (mainly for non-const to const).

Definition at line 100 of file Teuchos_FilteredIterator.hpp.

◆ operator*()

itr*

Definition at line 115 of file Teuchos_FilteredIterator.hpp.

◆ operator->()

itr->member

Definition at line 118 of file Teuchos_FilteredIterator.hpp.

◆ operator++() [1/2]

++itr

Definition at line 127 of file Teuchos_FilteredIterator.hpp.

◆ operator++() [2/2]

itr++

Definition at line 135 of file Teuchos_FilteredIterator.hpp.

◆ operator--() [1/2]

–itr

Definition at line 142 of file Teuchos_FilteredIterator.hpp.

◆ operator--() [2/2]

itr–

Definition at line 150 of file Teuchos_FilteredIterator.hpp.

◆ current()

Definition at line 163 of file Teuchos_FilteredIterator.hpp.

◆ begin()

Definition at line 165 of file Teuchos_FilteredIterator.hpp.

◆ end()

Definition at line 167 of file Teuchos_FilteredIterator.hpp.

◆ pred()

Definition at line 169 of file Teuchos_FilteredIterator.hpp.

◆ advanceForwardToValid()

void Teuchos::FilteredIterator< IteratorType, Predicate >::advanceForwardToValid ( )
private

Definition at line 249 of file Teuchos_FilteredIterator.hpp.

◆ advanceBackwardToValid()

void Teuchos::FilteredIterator< IteratorType, Predicate >::advanceBackwardToValid ( )
private

Definition at line 258 of file Teuchos_FilteredIterator.hpp.

◆ assertNotIterateForwardPastEnd()

void Teuchos::FilteredIterator< IteratorType, Predicate >::assertNotIterateForwardPastEnd ( )
inlineprivate

Definition at line 191 of file Teuchos_FilteredIterator.hpp.

◆ assertNotIterateBackwardPastBegin()

void Teuchos::FilteredIterator< IteratorType, Predicate >::assertNotIterateBackwardPastBegin ( )
inlineprivate

Definition at line 198 of file Teuchos_FilteredIterator.hpp.

Friends And Related Symbol Documentation

◆ operator==()

itr1 == itr2.

Definition at line 212 of file Teuchos_FilteredIterator.hpp.

◆ operator!=()

itr1 != itr2.

Definition at line 223 of file Teuchos_FilteredIterator.hpp.

◆ operator<<()

std::ostream & operator<< ( std::ostream & out,
const FilteredIterator< IteratorType, Predicate > & itr )
related

ostream operator.

WARNING: This requires that IteratorType also support operator<<().

Definition at line 237 of file Teuchos_FilteredIterator.hpp.

Member Data Documentation

◆ current_

Definition at line 176 of file Teuchos_FilteredIterator.hpp.

◆ begin_

Definition at line 178 of file Teuchos_FilteredIterator.hpp.

◆ end_

Definition at line 180 of file Teuchos_FilteredIterator.hpp.

◆ pred_

Definition at line 182 of file Teuchos_FilteredIterator.hpp.


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