1 #ifndef gamgee__variant_iterator__guard
2 #define gamgee__variant_iterator__guard
29 VariantIterator(
const std::shared_ptr<htsFile>& variant_file_ptr,
const std::shared_ptr<bcf_hdr_t>& variant_header_ptr);
94 #endif // gamgee__variant_iterator__guard
Variant & operator++()
pre-fetches the next record and tests for end of file
Definition: variant_iterator.cpp:23
virtual void fetch_next_record()
fetches next Variant record into existing htslib memory without making a copy
Definition: variant_iterator.cpp:40
std::shared_ptr< bcf_hdr_t > m_variant_header_ptr
pointer to the variant header
Definition: variant_iterator.h:85
bool operator!=(const VariantIterator &rhs) const
inequality operator (needed by for-each loop)
Definition: variant_iterator.cpp:28
VariantIterator & operator=(VariantIterator &&)=default
a VariantIterator move assignment operator guarantees all objects will have the same state...
VariantIterator()=default
creates an empty iterator (used for the end() method)
Variant & operator*()
dereference operator (needed by for-each loop)
Definition: variant_iterator.cpp:19
Utility class to enable for-each style iteration in the VariantReader class.
Definition: variant_iterator.h:15
Variant m_variant_record
temporary record to hold between fetch (operator++) and serve (operator*)
Definition: variant_iterator.h:87
Definition: exceptions.h:9
bool empty() const
returns whether the iterator has no additional records
Definition: variant_iterator.cpp:32
std::shared_ptr< bcf1_t > m_variant_record_ptr
pointer to the internal structure of the variant record. Useful to only allocate it once...
Definition: variant_iterator.h:86
Utility class to manipulate a Variant record.
Definition: variant.h:29
std::shared_ptr< htsFile > m_variant_file_ptr
pointer to the vcf/bcf file
Definition: variant_iterator.h:84