CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::FilterIterator< IteratorType > Class Template Reference

#include <FilterIterator.hh>

+ Inheritance diagram for CASM::FilterIterator< IteratorType >:

Detailed Description

template<typename IteratorType>
class CASM::FilterIterator< IteratorType >

Filter iterator allows skipping elements that return false from filter function

Definition at line 20 of file FilterIterator.hh.

Public Types

using pointer = typename IteratorType::pointer
 
using reference = typename IteratorType::reference
 
using DataObject = typename IteratorType::value_type
 

Public Member Functions

 FilterIterator ()
 
 FilterIterator (IteratorType const &_begin, IteratorType const &_end, std::function< bool(reference)> _filter)
 
 FilterIterator (IteratorType const &_end)
 
reference operator* () const
 
pointer operator-> () const
 
bool operator== (const FilterIterator &RHS) const
 
bool operator!= (const FilterIterator &RHS) const
 
FilterIteratoroperator++ ()
 
FilterIterator operator++ (int)
 

Private Attributes

IteratorType m_it
 
IteratorType m_end
 
std::function< bool(reference)> m_filter
 

Friends

void swap (FilterIterator &a, FilterIterator &b)
 Definitions. More...
 

Member Typedef Documentation

◆ DataObject

template<typename IteratorType >
using CASM::FilterIterator< IteratorType >::DataObject = typename IteratorType::value_type

Definition at line 25 of file FilterIterator.hh.

◆ pointer

template<typename IteratorType >
using CASM::FilterIterator< IteratorType >::pointer = typename IteratorType::pointer

Definition at line 23 of file FilterIterator.hh.

◆ reference

template<typename IteratorType >
using CASM::FilterIterator< IteratorType >::reference = typename IteratorType::reference

Definition at line 24 of file FilterIterator.hh.

Constructor & Destructor Documentation

◆ FilterIterator() [1/3]

template<typename IteratorType >
CASM::FilterIterator< IteratorType >::FilterIterator ( )
inline

Definition at line 27 of file FilterIterator.hh.

◆ FilterIterator() [2/3]

template<typename IteratorType >
CASM::FilterIterator< IteratorType >::FilterIterator ( IteratorType const &  _begin,
IteratorType const &  _end,
std::function< bool(reference)>  _filter 
)
inline

Definition at line 29 of file FilterIterator.hh.

◆ FilterIterator() [3/3]

template<typename IteratorType >
CASM::FilterIterator< IteratorType >::FilterIterator ( IteratorType const &  _end)
inline

Definition at line 37 of file FilterIterator.hh.

Member Function Documentation

◆ operator!=()

template<typename IteratorType >
bool CASM::FilterIterator< IteratorType >::operator!= ( const FilterIterator< IteratorType > &  RHS) const
inline

Definition at line 45 of file FilterIterator.hh.

◆ operator*()

template<typename IteratorType >
reference CASM::FilterIterator< IteratorType >::operator* ( ) const
inline

Definition at line 39 of file FilterIterator.hh.

◆ operator++() [1/2]

template<typename IteratorType >
FilterIterator& CASM::FilterIterator< IteratorType >::operator++ ( )
inline

Definition at line 47 of file FilterIterator.hh.

◆ operator++() [2/2]

template<typename IteratorType >
FilterIterator CASM::FilterIterator< IteratorType >::operator++ ( int  )
inline

Definition at line 55 of file FilterIterator.hh.

◆ operator->()

template<typename IteratorType >
pointer CASM::FilterIterator< IteratorType >::operator-> ( ) const
inline

Definition at line 41 of file FilterIterator.hh.

◆ operator==()

template<typename IteratorType >
bool CASM::FilterIterator< IteratorType >::operator== ( const FilterIterator< IteratorType > &  RHS) const
inline

Definition at line 43 of file FilterIterator.hh.

Friends And Related Function Documentation

◆ swap

template<typename IteratorType >
void swap ( FilterIterator< IteratorType > &  a,
FilterIterator< IteratorType > &  b 
)
friend

Definitions.

Definition at line 70 of file FilterIterator.hh.

Member Data Documentation

◆ m_end

template<typename IteratorType >
IteratorType CASM::FilterIterator< IteratorType >::m_end
private

Definition at line 64 of file FilterIterator.hh.

◆ m_filter

template<typename IteratorType >
std::function<bool(reference)> CASM::FilterIterator< IteratorType >::m_filter
private

Definition at line 65 of file FilterIterator.hh.

◆ m_it

template<typename IteratorType >
IteratorType CASM::FilterIterator< IteratorType >::m_it
private

Definition at line 64 of file FilterIterator.hh.


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