Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fastq_reader.h
Go to the documentation of this file.
1 #ifndef gamgee__fastq_reader__guard
2 #define gamgee__fastq_reader__guard
3 
4 #include "fastq_iterator.h"
5 
6 #include <string>
7 #include <iostream>
8 #include <fstream>
9 #include <vector>
10 #include <memory>
11 
12 namespace gamgee {
13 
36 class FastqReader {
37  public:
38 
45  explicit FastqReader(const std::string& filename);
46 
53  explicit FastqReader(const std::vector<std::string>& filenames);
54 
61  explicit FastqReader(std::istream* const input);
62 
67  FastqReader(FastqReader&&) = default;
68  FastqReader& operator=(FastqReader&&) = default;
69 
73  FastqReader(const FastqReader&) = delete;
74  FastqReader& operator=(const FastqReader&) = delete;
75 
83 
90 
91 private:
92  std::shared_ptr<std::istream> m_input_stream;
93 
94  void init_reader(const std::string& filename);
95 };
96 
97 } // end of namespace
98 
99 #endif // gamgee__fastq_reader__guard
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.
Definition: fastq_reader.h:36
FastqReader(const std::string &filename)
reads through all records in a file (fasta or fastq) parsing them into Fastq objects ...
Definition: fastq_reader.cpp:17
FastqIterator begin()
creates a FastqIterator pointing at the start of the input stream (needed by for-each loop) ...
Definition: fastq_reader.cpp:39
FastqIterator end()
creates a FastqIterator with a nullified input stream (needed by for-each loop)
Definition: fastq_reader.cpp:43
Utility class to enable for-each style iteration in the FastqReader class.
Definition: fastq_iterator.h:14
Definition: exceptions.h:9
FastqReader & operator=(FastqReader &&)=default