1 #ifndef gamgee__indexed_sam_iterator__guard
2 #define gamgee__indexed_sam_iterator__guard
6 #include "../utils/hts_memory.h"
34 IndexedSamIterator(
const std::shared_ptr<htsFile>& sam_file_ptr,
const std::shared_ptr<hts_idx_t>& sam_index_ptr,
35 const std::shared_ptr<bam_hdr_t>& sam_header_ptr,
const std::vector<std::string>& interval_list);
77 std::shared_ptr<htsFile> m_sam_file_ptr;
78 std::shared_ptr<hts_idx_t> m_sam_index_ptr;
79 std::shared_ptr<bam_hdr_t> m_sam_header_ptr;
80 std::vector<std::string> m_interval_list;
82 std::unique_ptr<hts_itr_t, utils::HtsIteratorDeleter> m_sam_itr_ptr;
83 std::shared_ptr<bam1_t> m_sam_record_ptr;
86 void fetch_next_record();
Sam & operator*()
dereference operator (needed by for-each loop)
Definition: indexed_sam_iterator.cpp:31
Utility class to enable for-each style iteration in the IndexedSamReader class.
Definition: indexed_sam_iterator.h:19
IndexedSamIterator()
creates an empty iterator (used for the end() method)
Definition: indexed_sam_iterator.cpp:10
void iterator(const char *fname)
Definition: test-vcf-api.c:248
bool operator!=(const IndexedSamIterator &rhs)
inequality operator (needed by for-each loop)
Definition: indexed_sam_iterator.cpp:40
Definition: exceptions.h:9
IndexedSamIterator & operator=(IndexedSamIterator &&other)=default
const std::string & current_interval() const
Definition: indexed_sam_iterator.cpp:55
Utility class to manipulate a Sam record.
Definition: sam.h:20
Sam & operator++()
pre-fetches the next record and tests for end of file
Definition: indexed_sam_iterator.cpp:35