Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
gamgee::FastqIterator Class Reference

Utility class to enable for-each style iteration in the FastqReader class. More...

#include <fastq_iterator.h>

Public Member Functions

 FastqIterator ()
 creates an empty iterator (used for the end() method) More...
 
 FastqIterator (std::shared_ptr< std::istream > &in)
 initializes a new iterator based on an input stream (e.g. fastq/a file, stdin, ...) More...
 
 FastqIterator (const FastqIterator &)=delete
 a FastqIterator should never be copied as the underlying stream can only be manipulated by one object. More...
 
FastqIteratoroperator= (const FastqIterator &)=delete
 
 FastqIterator (FastqIterator &&)=default
 a FastqIterator move constructor guarantees all objects will have the same state. More...
 
FastqIteratoroperator= (FastqIterator &&)=default
 
bool operator== (const FastqIterator &rhs) const
 equality operator More...
 
bool operator!= (const FastqIterator &rhs) const
 inequality operator (needed by for-each loop) More...
 
Fastqoperator* ()
 dereference operator (needed by for-each loop) More...
 
Fastqoperator++ ()
 increment operator (needed by for-each loop) More...
 

Detailed Description

Utility class to enable for-each style iteration in the FastqReader class.

Constructor & Destructor Documentation

gamgee::FastqIterator::FastqIterator ( )

creates an empty iterator (used for the end() method)

gamgee::FastqIterator::FastqIterator ( std::shared_ptr< std::istream > &  in)
explicit

initializes a new iterator based on an input stream (e.g. fastq/a file, stdin, ...)

Parameters
ininput stream
gamgee::FastqIterator::FastqIterator ( const FastqIterator )
delete

a FastqIterator should never be copied as the underlying stream can only be manipulated by one object.

gamgee::FastqIterator::FastqIterator ( FastqIterator &&  )
default

a FastqIterator move constructor guarantees all objects will have the same state.

Member Function Documentation

bool gamgee::FastqIterator::operator!= ( const FastqIterator rhs) const

inequality operator (needed by for-each loop)

Parameters
rhsthe other FastqIterator to compare to
Returns
whether or not the two iterators are the same (e.g. have the same input stream on the same status)
Fastq & gamgee::FastqIterator::operator* ( )

dereference operator (needed by for-each loop)

Returns
a reference to a parsed Fastq object (current in the stream)
Fastq & gamgee::FastqIterator::operator++ ( )

increment operator (needed by for-each loop)

Returns
the next parsed Fastq object (next in the stream)
FastqIterator& gamgee::FastqIterator::operator= ( const FastqIterator )
delete
FastqIterator& gamgee::FastqIterator::operator= ( FastqIterator &&  )
default
bool gamgee::FastqIterator::operator== ( const FastqIterator rhs) const

equality operator

Parameters
rhsthe other FastqIterator to compare to
Returns
whether or not the two iterators are the same (e.g. have the same input stream on the same status)

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