yat  0.14.5pre
Public Member Functions | Friends | List of all members
theplu::yat::utility::CigarIterator< BASE > Class Template Reference

Iterator over a CIGAR. More...

#include <yat/utility/CigarIterator.h>

Inheritance diagram for theplu::yat::utility::CigarIterator< BASE >:

Public Member Functions

 CigarIterator (void)
 Default constructor.
 
 CigarIterator (BASE p, size_t offset=0)
 
BASE base (void) const
 

Friends

class boost::iterator_core_access
 

Detailed Description

template<typename BASE>
class theplu::yat::utility::CigarIterator< BASE >

Iterator over a CIGAR.

A CIGAR string is typically represented as a compact array, i.e., an array MMMMMMDDMMMM is represented as 6M2D4M. This class is a proxy that allows iterating over a CIGAR as though the array was MMMMMMDDMMMM.

CigarIterator is a Readable Iterator (not mutable) and models a Bidirectional Traversal Iterator. Its value_type is uint8_t. Since no uint8_t is stored in CIGAR, the dereference operator calculates the CIGAR element to return and returns by value. CigarIterator is therefore an Input Iterator.

Type Requirement:

Since
New in yat 0.13

Constructor & Destructor Documentation

template<typename BASE>
theplu::yat::utility::CigarIterator< BASE >::CigarIterator ( BASE  p,
size_t  offset = 0 
)
explicit

Construct an iterator that points to element offset in p. If p corresponds to 5M and offset is 2, the iterator points to the third M.

Member Function Documentation

template<typename BASE >
BASE theplu::yat::utility::CigarIterator< BASE >::base ( void  ) const
Returns
underlying iterator

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

Generated on Tue Sep 26 2017 02:33:30 for yat by  doxygen 1.8.5