1 #ifndef theplu_yat_utility_cigar_iterator
2 #define theplu_yat_utility_cigar_iterator
27 #include <boost/concept_check.hpp>
28 #include <boost/cstdint.hpp>
29 #include <boost/iterator/iterator_facade.hpp>
30 #include <boost/iterator/iterator_categories.hpp>
31 #include <boost/iterator/iterator_concepts.hpp>
55 template<
typename BASE>
57 :
public boost::iterator_facade<
58 CigarIterator<BASE>, uint8_t
59 , boost::bidirectional_traversal_tag, const uint8_t>
77 BASE
base(
void)
const;
79 friend class boost::iterator_core_access;
85 uint8_t dereference(
void)
const;
97 template<
typename BASE>
100 BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIterator<BASE>));
101 BOOST_CONCEPT_ASSERT((boost_concepts::BidirectionalTraversal<BASE>));
105 template<
typename BASE>
107 : base_(b), index_(x)
109 BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIterator<BASE>));
110 BOOST_CONCEPT_ASSERT((boost_concepts::BidirectionalTraversal<BASE>));
114 template<
typename BASE>
121 template<
typename BASE>
128 index_ = bam_cigar_oplen(*base_)-1;
133 template<
typename BASE>
134 uint8_t CigarIterator<BASE>::dereference(
void)
const
136 return bam_cigar_op(*base_);
140 template<
typename BASE>
141 bool CigarIterator<BASE>::equal(
const CigarIterator& other)
const
143 return base_==other.base_ && index_==other.index_;
147 template<
typename BASE>
148 void CigarIterator<BASE>::increment(
void)
150 if (++index_ == bam_cigar_oplen(*base_)) {
Iterator over a CIGAR.
Definition: CigarIterator.h:56
BASE base(void) const
Definition: CigarIterator.h:115
CigarIterator(void)
Default constructor.
Definition: CigarIterator.h:98