Gamgee
You miserable little maggot. I'll stove your head in!
|
Utility class to enable for-each style iteration by pairs in the SamReader class. More...
#include <sam_pair_iterator.h>
Public Member Functions | |
SamPairIterator () | |
creates an empty iterator (used for the end() method) More... | |
SamPairIterator (samFile *sam_file_ptr, const std::shared_ptr< bam_hdr_t > &sam_header_ptr) | |
initializes a new iterator based on an input stream (e.g. sam/a file, stdin, ...) More... | |
SamPairIterator (SamPairIterator &&other) | |
a SamPairIterator move constructor guarantees all objects will have the same state. More... | |
bool | operator!= (const SamPairIterator &rhs) |
inequality operator (needed by for-each loop) More... | |
std::pair< Sam, Sam > | operator* () |
dereference operator (needed by for-each loop) More... | |
std::pair< Sam, Sam > | operator++ () |
pre-fetches the next record and tests for end of file More... | |
Utility class to enable for-each style iteration by pairs in the SamReader class.
gamgee::SamPairIterator::SamPairIterator | ( | ) |
creates an empty iterator (used for the end() method)
gamgee::SamPairIterator::SamPairIterator | ( | samFile * | sam_file_ptr, |
const std::shared_ptr< bam_hdr_t > & | sam_header_ptr | ||
) |
initializes a new iterator based on an input stream (e.g. sam/a file, stdin, ...)
sam_file_ptr | pointer to a sam file opened via the sam_open() macro from htslib |
sam_header_ptr | pointer to a sam file header created with the sam_hdr_read() macro from htslib |
gamgee::SamPairIterator::SamPairIterator | ( | SamPairIterator && | other | ) |
a SamPairIterator move constructor guarantees all objects will have the same state.
bool gamgee::SamPairIterator::operator!= | ( | const SamPairIterator & | rhs | ) |
inequality operator (needed by for-each loop)
rhs | the other SamPairIterator to compare to |
dereference operator (needed by for-each loop)
pre-fetches the next record and tests for end of file