A library for working with phylogenetic and population genetic data.
v0.27.0
LambdaIterator< T, D >::Iterator Class Reference

#include <genesis/utils/containers/lambda_iterator.hpp>

Detailed Description

template<class T, class D = EmptyLambdaIteratorData>
class genesis::utils::LambdaIterator< T, D >::Iterator

Internal iterator over the data.

Definition at line 183 of file lambda_iterator.hpp.

Public Member Functions

 Iterator ()=default
 Default constructor for empty (past-the-end) data. More...
 
 Iterator (self_type &&)=default
 
 Iterator (self_type const &)=default
 
 ~Iterator ()=default
 
Data const & data () const
 Access the data stored in the iterator. More...
 
 operator bool () const
 Return whether the iterator is at a valid position, that is, if its input has yielded an element. More...
 
bool operator!= (self_type const &other) const
 
value_typeoperator* ()
 
const value_typeoperator* () const
 
self_typeoperator++ ()
 
value_typeoperator-> ()
 
const value_typeoperator-> () const
 
Iteratoroperator= (self_type &&)=default
 
Iteratoroperator= (self_type const &)=default
 
bool operator== (self_type const &other) const
 Compare two iterators for equality. More...
 

Public Types

using Data = D
 
using difference_type = std::ptrdiff_t
 
using iterator_category = std::input_iterator_tag
 
using pointer = value_type const *
 
using reference = value_type const &
 
using self_type = LambdaIterator< T, D >::Iterator
 
using value_type = T
 

Public Attributes

friend LambdaIterator
 

Constructor & Destructor Documentation

◆ Iterator() [1/3]

Iterator ( )
default

Default constructor for empty (past-the-end) data.

Public, so that an empty default instance can be used in a (placeholder) variable before assining it a value (e.g., when default-constructing an object that holds a LambdaIterator instance).

◆ ~Iterator()

~Iterator ( )
default

◆ Iterator() [2/3]

Iterator ( self_type const &  )
default

◆ Iterator() [3/3]

Iterator ( self_type &&  )
default

Member Function Documentation

◆ data()

Data const& data ( ) const
inline

Access the data stored in the iterator.

Definition at line 297 of file lambda_iterator.hpp.

◆ operator bool()

operator bool ( ) const
inline

Return whether the iterator is at a valid position, that is, if its input has yielded an element.

Definition at line 346 of file lambda_iterator.hpp.

◆ operator!=()

bool operator!= ( self_type const &  other) const
inline

Definition at line 378 of file lambda_iterator.hpp.

◆ operator*() [1/2]

value_type& operator* ( )
inline

Definition at line 286 of file lambda_iterator.hpp.

◆ operator*() [2/2]

const value_type& operator* ( ) const
inline

Definition at line 278 of file lambda_iterator.hpp.

◆ operator++()

self_type& operator++ ( )
inline

Definition at line 329 of file lambda_iterator.hpp.

◆ operator->() [1/2]

value_type* operator-> ( )
inline

Definition at line 270 of file lambda_iterator.hpp.

◆ operator->() [2/2]

const value_type* operator-> ( ) const
inline

Definition at line 262 of file lambda_iterator.hpp.

◆ operator=() [1/2]

Iterator& operator= ( self_type &&  )
default

◆ operator=() [2/2]

Iterator& operator= ( self_type const &  )
default

◆ operator==()

bool operator== ( self_type const &  other) const
inline

Compare two iterators for equality.

Any two iterators that are copies of each other without having moved will compare equal, as long as neither of them is past-the-end. A valid (not past-the-end) iterator and an end() iterator will not compare equal, no matter from which LambdaIterator they were created. Two past-the-end iterators compare equal.

Definition at line 362 of file lambda_iterator.hpp.

Member Typedef Documentation

◆ Data

using Data = D

Definition at line 198 of file lambda_iterator.hpp.

◆ difference_type

using difference_type = std::ptrdiff_t

Definition at line 195 of file lambda_iterator.hpp.

◆ iterator_category

using iterator_category = std::input_iterator_tag

Definition at line 196 of file lambda_iterator.hpp.

◆ pointer

using pointer = value_type const*

Definition at line 193 of file lambda_iterator.hpp.

◆ reference

using reference = value_type const&

Definition at line 194 of file lambda_iterator.hpp.

◆ self_type

Definition at line 191 of file lambda_iterator.hpp.

◆ value_type

using value_type = T

Definition at line 192 of file lambda_iterator.hpp.

Member Data Documentation

◆ LambdaIterator

Definition at line 256 of file lambda_iterator.hpp.


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