Gamgee
You miserable little maggot. I'll stove your head in!
|
Utility class to read many Fastq records from a stream (e.g. Fastq file, stdin, ...) in a for-each loop in a for-each loop. More...
#include <fastq_reader.h>
Public Member Functions | |
FastqReader (const std::string &filename) | |
reades through all records in a file (fasta or fastq) parsing them into Fastq objects More... | |
FastqReader (std::istream *const input) | |
reades through all records in a stream (e.g. stdin) parsing them into Fastq objects More... | |
~FastqReader () | |
closes the file stream if there is one (in case we are reading a fasta/fastq file) More... | |
FastqReader (FastqReader &&) | |
move constructor for the FastqReader class simply transfers all objects with the state maintained. More... | |
FastqReader (const FastqReader &)=delete | |
a FastqReader cannot be copied safely, as it is iterating over a stream. More... | |
FastqIterator | begin () |
creates a FastqIterator pointing at the start of the input stream (needed by for-each loop) More... | |
FastqIterator | end () |
creates a FastqIterator with a nullified input stream (needed by for-each loop) More... | |
Utility class to read many Fastq records from a stream (e.g. Fastq file, stdin, ...) in a for-each loop in a for-each loop.
This class is designed to parse fastq files in for-each loops with the following signature:
You can also use it with the stdin or any other stream by simply giving the reference to the stream in the constructor, like so:
Although one could use it as an iterator, if your goal is to do so, you should use the FastqIterator class
gamgee::FastqReader::FastqReader | ( | const std::string & | filename | ) |
reades through all records in a file (fasta or fastq) parsing them into Fastq objects
filename | the name of the fasta/fastq file |
gamgee::FastqReader::FastqReader | ( | std::istream *const | input | ) |
reades through all records in a stream (e.g. stdin) parsing them into Fastq objects
input | a reference to the input stream (e.g. &std::cin) |
gamgee::FastqReader::~FastqReader | ( | ) |
closes the file stream if there is one (in case we are reading a fasta/fastq file)
gamgee::FastqReader::FastqReader | ( | FastqReader && | ) |
move constructor for the FastqReader class simply transfers all objects with the state maintained.
|
delete |
a FastqReader cannot be copied safely, as it is iterating over a stream.
FastqIterator gamgee::FastqReader::begin | ( | ) |
creates a FastqIterator pointing at the start of the input stream (needed by for-each loop)
FastqIterator gamgee::FastqReader::end | ( | ) |
creates a FastqIterator with a nullified input stream (needed by for-each loop)