pops-core  0.9
PoPS (Pest or Pathogen Spread) Model Core C++ library
Public Member Functions | List of all members
pops::Network< RasterIndex >::ConstEitherWayIterator< Container > Class Template Reference

A const iterator which encapsulates either forward or reverse iterator. More...

#include <network_kernel.hpp>

Inheritance diagram for pops::Network< RasterIndex >::ConstEitherWayIterator< Container >:
Inheritance graph
[legend]

Public Member Functions

 ConstEitherWayIterator (typename Container::const_iterator it)
 
 ConstEitherWayIterator (typename Container::const_reverse_iterator it)
 
ConstEitherWayIteratoroperator++ ()
 
const Container::value_type & operator* () const
 
bool operator!= (const ConstEitherWayIterator &other)
 

Detailed Description

template<typename RasterIndex>
template<typename Container>
class pops::Network< RasterIndex >::ConstEitherWayIterator< Container >

A const iterator which encapsulates either forward or reverse iterator.

Uses the iterator was passed in the constructor, but it can contain either forward or reverse iterator, so it allows writing direction agnostic code where the direction is determined in the runtime.

Definition at line 437 of file network_kernel.hpp.

Constructor & Destructor Documentation

◆ ConstEitherWayIterator() [1/2]

template<typename RasterIndex >
template<typename Container >
pops::Network< RasterIndex >::ConstEitherWayIterator< Container >::ConstEitherWayIterator ( typename Container::const_iterator  it)
inline

Definition at line 440 of file network_kernel.hpp.

◆ ConstEitherWayIterator() [2/2]

template<typename RasterIndex >
template<typename Container >
pops::Network< RasterIndex >::ConstEitherWayIterator< Container >::ConstEitherWayIterator ( typename Container::const_reverse_iterator  it)
inline

Definition at line 443 of file network_kernel.hpp.

Member Function Documentation

◆ operator!=()

template<typename RasterIndex >
template<typename Container >
bool pops::Network< RasterIndex >::ConstEitherWayIterator< Container >::operator!= ( const ConstEitherWayIterator< Container > &  other)
inline

Definition at line 460 of file network_kernel.hpp.

◆ operator*()

template<typename RasterIndex >
template<typename Container >
const Container::value_type& pops::Network< RasterIndex >::ConstEitherWayIterator< Container >::operator* ( ) const
inline

Definition at line 454 of file network_kernel.hpp.

◆ operator++()

template<typename RasterIndex >
template<typename Container >
ConstEitherWayIterator& pops::Network< RasterIndex >::ConstEitherWayIterator< Container >::operator++ ( )
inline

Definition at line 446 of file network_kernel.hpp.


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