A library for working with phylogenetic and population genetic data.
v0.27.0
CsvInputIterator Class Reference

#include <genesis/utils/formats/csv/input_iterator.hpp>

Detailed Description

Definition at line 50 of file utils/formats/csv/input_iterator.hpp.

Public Member Functions

 CsvInputIterator ()
 Create a default instance, with no input. More...
 
 CsvInputIterator (CsvInputIterator &&)=default
 
 CsvInputIterator (CsvInputIterator const &)=default
 
 CsvInputIterator (std::shared_ptr< utils::BaseInputSource > source)
 Create an instance that reads from an input source, using a default CsvReader. More...
 
 CsvInputIterator (std::shared_ptr< utils::BaseInputSource > source, CsvReader const &settings)
 Create an instance that reads from an input source, using the settings of a given CsvReader. More...
 
 ~CsvInputIterator ()=default
 
self_typebegin ()
 Beginning of the iterator. More...
 
value_type const & dereference () const
 
self_type end ()
 End of the iterator. More...
 
void increment ()
 
 operator bool () const
 Return true iff dereferencing is valid, i.e., iff there is a Csv Line available. More...
 
bool operator!= (self_type const &other) const
 
value_type const & operator* () const
 
self_typeoperator++ ()
 
value_type const * operator-> () const
 
CsvInputIteratoroperator= (CsvInputIterator &&)=default
 
CsvInputIteratoroperator= (CsvInputIterator const &)=default
 
bool operator== (self_type const &other) const
 

Public Types

using iterator_category = std::input_iterator_tag
 
using pointer = value_type *
 
using reference = value_type &
 
using self_type = CsvInputIterator
 
using value_type = CsvReader::Line
 

Constructor & Destructor Documentation

◆ CsvInputIterator() [1/5]

CsvInputIterator ( )
inline

Create a default instance, with no input.

Definition at line 71 of file utils/formats/csv/input_iterator.hpp.

◆ CsvInputIterator() [2/5]

CsvInputIterator ( std::shared_ptr< utils::BaseInputSource source)
inlineexplicit

Create an instance that reads from an input source, using a default CsvReader.

Definition at line 80 of file utils/formats/csv/input_iterator.hpp.

◆ CsvInputIterator() [3/5]

CsvInputIterator ( std::shared_ptr< utils::BaseInputSource source,
CsvReader const &  settings 
)
inline

Create an instance that reads from an input source, using the settings of a given CsvReader.

Definition at line 92 of file utils/formats/csv/input_iterator.hpp.

◆ ~CsvInputIterator()

~CsvInputIterator ( )
default

◆ CsvInputIterator() [4/5]

CsvInputIterator ( CsvInputIterator const &  )
default

◆ CsvInputIterator() [5/5]

Member Function Documentation

◆ begin()

self_type& begin ( )
inline

Beginning of the iterator.

This is a bit uncommon, as the iterator provides its own begin() and end() functions. We do this to allow the easy use case of range-based for loops.

Definition at line 159 of file utils/formats/csv/input_iterator.hpp.

◆ dereference()

value_type const& dereference ( ) const
inline

Definition at line 144 of file utils/formats/csv/input_iterator.hpp.

◆ end()

self_type end ( )
inline

End of the iterator.

Beginning of the iterator. This is a bit uncommon, as the iterator provides its own begin() and end() functions. We do this to allow the easy use case of range-based for loops.

Definition at line 169 of file utils/formats/csv/input_iterator.hpp.

◆ increment()

void increment ( )
inline

Definition at line 180 of file utils/formats/csv/input_iterator.hpp.

◆ operator bool()

operator bool ( ) const
inlineexplicit

Return true iff dereferencing is valid, i.e., iff there is a Csv Line available.

Definition at line 125 of file utils/formats/csv/input_iterator.hpp.

◆ operator!=()

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

Definition at line 117 of file utils/formats/csv/input_iterator.hpp.

◆ operator*()

value_type const& operator* ( ) const
inline

Definition at line 134 of file utils/formats/csv/input_iterator.hpp.

◆ operator++()

self_type& operator++ ( )
inline

Definition at line 174 of file utils/formats/csv/input_iterator.hpp.

◆ operator->()

value_type const* operator-> ( ) const
inline

Definition at line 139 of file utils/formats/csv/input_iterator.hpp.

◆ operator=() [1/2]

CsvInputIterator& operator= ( CsvInputIterator &&  )
default

◆ operator=() [2/2]

CsvInputIterator& operator= ( CsvInputIterator const &  )
default

◆ operator==()

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

Definition at line 112 of file utils/formats/csv/input_iterator.hpp.

Member Typedef Documentation

◆ iterator_category

using iterator_category = std::input_iterator_tag

Definition at line 62 of file utils/formats/csv/input_iterator.hpp.

◆ pointer

using pointer = value_type*

Definition at line 60 of file utils/formats/csv/input_iterator.hpp.

◆ reference

Definition at line 61 of file utils/formats/csv/input_iterator.hpp.

◆ self_type

◆ value_type


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