Utility class to enable for-each style iteration in the MultipleVariantReader class.
More...
#include <multiple_variant_iterator.h>
Utility class to enable for-each style iteration in the MultipleVariantReader class.
gamgee::MultipleVariantIterator::MultipleVariantIterator |
( |
| ) |
|
|
default |
creates an empty iterator (used for the end() method)
gamgee::MultipleVariantIterator::MultipleVariantIterator |
( |
const std::vector< std::shared_ptr< htsFile >> & |
variant_files, |
|
|
const std::vector< std::shared_ptr< bcf_hdr_t >> & |
variant_headers |
|
) |
| |
initializes a new iterator based on a vector of input files (vcf or bcf)
- Parameters
-
variant_files | vector of vcf/bcf files opened via the bcf_open() macro from htslib |
variant_headers | vector of headers corresponding to the files |
pseudo-inequality operator (needed by for-each loop)
- Warning
- this method does the minimal work necessary to determine that we have reached the end of iteration. it is NOT a valid general-purpose inequality method.
- Parameters
-
- Returns
- whether both iterators have entered their end states
std::vector< VariantIndexPair > & gamgee::MultipleVariantIterator::operator* |
( |
| ) |
|
dereference operator (needed by for-each loop)
- Returns
- a reference to the iterator's Variant vector
std::vector< VariantIndexPair > & gamgee::MultipleVariantIterator::operator++ |
( |
| ) |
|
advances the iterator, fetching the next vector
- Returns
- a reference to the iterator's Variant vector
The documentation for this class was generated from the following files: