Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
gamgee::ReferenceBlockSplittingVariantIterator Class Reference

Utility class to handle reference blocks while iterating over multiple variant files. More...

#include <reference_block_splitting_variant_iterator.h>

Inheritance diagram for gamgee::ReferenceBlockSplittingVariantIterator:
gamgee::MultipleVariantIterator

Public Member Functions

 ReferenceBlockSplittingVariantIterator ()=default
 creates an empty iterator (used for the end() method) More...
 
 ReferenceBlockSplittingVariantIterator (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) More...
 
 ReferenceBlockSplittingVariantIterator (ReferenceBlockSplittingVariantIterator &&)=default
 a ReferenceBlockSplittingVariantIterator move constructor guarantees all objects will have the same state. More...
 
ReferenceBlockSplittingVariantIteratoroperator= (ReferenceBlockSplittingVariantIterator &&)=default
 
 ReferenceBlockSplittingVariantIterator (const ReferenceBlockSplittingVariantIterator &)=delete
 a ReferenceBlockSplittingVariantIterator cannot be copied. More...
 
ReferenceBlockSplittingVariantIteratoroperator= (const ReferenceBlockSplittingVariantIterator &)=delete
 
bool operator!= (const ReferenceBlockSplittingVariantIterator &rhs)
 pseudo-inequality operator (needed by for-each loop) More...
 
std::vector< VariantIndexPair > & operator* ()
 dereference operator (needed by for-each loop) More...
 
std::vector< VariantIndexPair > & operator++ ()
 advances the iterator, fetching the next vector More...
 
- Public Member Functions inherited from gamgee::MultipleVariantIterator
 MultipleVariantIterator ()=default
 creates an empty iterator (used for the end() method) More...
 
 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) More...
 
 MultipleVariantIterator (MultipleVariantIterator &&)=default
 a MultipleVariantIterator move constructor guarantees all objects will have the same state. More...
 
MultipleVariantIteratoroperator= (MultipleVariantIterator &&other)=default
 
 MultipleVariantIterator (const MultipleVariantIterator &)=delete
 a MultipleVariantIterator cannot be copied safely, as it is iterating over streams. More...
 
MultipleVariantIteratoroperator= (const MultipleVariantIterator &other)=delete
 
bool operator!= (const MultipleVariantIterator &rhs)
 pseudo-inequality operator (needed by for-each loop) More...
 
std::vector< VariantIndexPair > & operator* ()
 dereference operator (needed by for-each loop) More...
 
std::vector< VariantIndexPair > & operator++ ()
 advances the iterator, fetching the next vector More...
 

Detailed Description

Utility class to handle reference blocks while iterating over multiple variant files.

This class is experimental/WIP

Constructor & Destructor Documentation

gamgee::ReferenceBlockSplittingVariantIterator::ReferenceBlockSplittingVariantIterator ( )
default

creates an empty iterator (used for the end() method)

gamgee::ReferenceBlockSplittingVariantIterator::ReferenceBlockSplittingVariantIterator ( 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_filesvector of vcf/bcf files opened via the bcf_open() macro from htslib
variant_headersvector of variant headers corresponding to these files
gamgee::ReferenceBlockSplittingVariantIterator::ReferenceBlockSplittingVariantIterator ( ReferenceBlockSplittingVariantIterator &&  )
default

a ReferenceBlockSplittingVariantIterator move constructor guarantees all objects will have the same state.

gamgee::ReferenceBlockSplittingVariantIterator::ReferenceBlockSplittingVariantIterator ( const ReferenceBlockSplittingVariantIterator )
delete

Member Function Documentation

bool gamgee::ReferenceBlockSplittingVariantIterator::operator!= ( const ReferenceBlockSplittingVariantIterator rhs)

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
rhsthe other ReferenceBlockSplittingVariantIterator to compare to
Returns
whether both iterators have entered their end states
std::vector< VariantIndexPair > & gamgee::ReferenceBlockSplittingVariantIterator::operator* ( )

dereference operator (needed by for-each loop)

Returns
a reference to the iterator's Variant vector
std::vector< VariantIndexPair > & gamgee::ReferenceBlockSplittingVariantIterator::operator++ ( )

advances the iterator, fetching the next vector

Returns
a reference to the iterator's Variant vector
ReferenceBlockSplittingVariantIterator& gamgee::ReferenceBlockSplittingVariantIterator::operator= ( ReferenceBlockSplittingVariantIterator &&  )
default
ReferenceBlockSplittingVariantIterator& gamgee::ReferenceBlockSplittingVariantIterator::operator= ( const ReferenceBlockSplittingVariantIterator )
delete

The documentation for this class was generated from the following files: