1 #ifndef gamgee__variant_filters_iterator__guard
2 #define gamgee__variant_filters_iterator__guard
6 #include "../utils/hts_memory.h"
27 VariantFiltersIterator(
const std::shared_ptr<bcf_hdr_t>& header,
const std::shared_ptr<bcf1_t>& body,
const uint32_t position) :
46 uint32_t
size()
const {
return uint32_t(m_body->d.n_flt); }
49 std::shared_ptr<bcf_hdr_t> m_header;
50 std::shared_ptr<bcf1_t> m_body;
56 #endif // gamgee__variant_filters_iterator__guard
VariantFiltersIterator operator-=(const int n)
rewinds the iterator by n positions
Definition: variant_filters_iterator.h:38
bool operator<(const VariantFiltersIterator &other)
Can be compared with inequality relational operators (<, >, <= and >=).
Definition: variant_filters_iterator.h:43
VariantFiltersIterator(const std::shared_ptr< bcf_hdr_t > &header, const std::shared_ptr< bcf1_t > &body, const uint32_t position)
simple constructor used by the VariantFilters begin/end member functions
Definition: variant_filters_iterator.h:27
simple random-access iterator class for VariantFilters objects
Definition: variant_filters_iterator.h:18
bool operator>(const VariantFiltersIterator &other)
Can be compared with inequality relational operators (<, >, <= and >=).
Definition: variant_filters_iterator.h:44
bool operator>=(const VariantFiltersIterator &other)
Can be compared with inequality relational operators (<, >, <= and >=).
Definition: variant_filters_iterator.h:42
uint32_t size() const
returns the number of filters in this object
Definition: variant_filters_iterator.h:46
bool operator!=(const VariantFiltersIterator &other)
can be compared for equivalence using the equality/inequality operators
Definition: variant_filters_iterator.h:39
void iterator(const char *fname)
Definition: test-vcf-api.c:248
bool operator==(const VariantFiltersIterator &other)
can be compared for equivalence using the equality/inequality operators
Definition: variant_filters_iterator.h:40
VariantFiltersIterator operator--()
rewinds the iterator by one position
Definition: variant_filters_iterator.h:36
Definition: exceptions.h:9
std::string operator[](int index) const
returns a new string for the element at position 'index'
Definition: variant_filters_iterator.h:33
VariantFiltersIterator operator+=(const int n)
advances the iterator by n positions
Definition: variant_filters_iterator.h:37
bool operator<=(const VariantFiltersIterator &other)
Can be compared with inequality relational operators (<, >, <= and >=).
Definition: variant_filters_iterator.h:41
std::string htslib_filter_name(bcf_hdr_t *header, bcf1_t *body, int index)
helper function to translate an index into a string in the filter list
Definition: hts_memory.cpp:144
std::string operator*() const
returns a new string for the element at the current position
Definition: variant_filters_iterator.h:34
VariantFiltersIterator operator++()
advances the iterator by one position
Definition: variant_filters_iterator.h:35