31 template <
typename alignment_executor_type>
35 static_assert(!std::is_const_v<alignment_executor_type>,
36 "Cannot create an alignment stream over a const buffer.");
56 constexpr iterator_type() noexcept =
default;
57 constexpr iterator_type(iterator_type
const &) noexcept =
default;
58 constexpr iterator_type(iterator_type &&) noexcept =
default;
59 constexpr iterator_type &
operator=(iterator_type
const &) noexcept =
default;
60 constexpr iterator_type &
operator=(iterator_type &&) noexcept =
default;
61 ~iterator_type() =
default;
64 constexpr iterator_type(
alignment_range & range) noexcept : range_ptr(&range)
77 return range_ptr->cache;
85 iterator_type & operator++() noexcept
93 void operator++(
int ) noexcept
106 return range_ptr->eof();
111 iterator_type
const & rhs) noexcept
119 return !(*
this == rhs);
124 iterator_type
const & rhs) noexcept
136 friend class iterator_type;
143 using value_type =
typename alignment_executor_type::value_type;
145 using reference =
typename alignment_executor_type::reference;
164 explicit alignment_range(alignment_executor_type
const & _alignment_executor) =
delete;
176 alignment_executor{
new alignment_executor_type{std::move(_alignment_executor)}},
224 if (!alignment_executor)
227 if (
auto opt = alignment_executor->bump(); opt.has_value())
228 cache = std::move(*opt);
234 constexpr
bool eof() const noexcept
253 template <
typename alignment_executor_type>
255 alignment_range(alignment_executor_type &&) -> alignment_range<std::remove_reference_t<alignment_executor_type>>;
void next()
Receives the next alignment result from the executor buffer.
Definition: alignment_range.hpp:220
::ranges::cbegin cbegin
Alias for ranges::cbegin. Returns an iterator to the beginning of a range.
Definition: ranges:209
alignment_range()=default
Defaulted.
typename alignment_executor_type::reference reference
The reference type.
Definition: alignment_range.hpp:145
alignment_range & operator=(alignment_range const &)=delete
This is a move-only type.
constexpr iterator begin()
Returns an iterator to the first element of the alignment range.
Definition: alignment_range.hpp:191
typename alignment_executor_type::difference_type difference_type
The offset type.
Definition: alignment_range.hpp:141
The main SeqAn3 namespace.
typename alignment_executor_type::value_type value_type
The alignment result type.
Definition: alignment_range.hpp:143
alignment_range(alignment_executor_type &&_alignment_executor)
Constructs a new alignment range by taking ownership over the passed alignment buffer.
Definition: alignment_range.hpp:175
void const_iterator
This range is never const-iterable. The const_iterator is always void.
Definition: alignment_range.hpp:149
Adaptations of concepts from the Ranges TS.
std::ranges::default_sentinel_t sentinel
The sentinel type.
Definition: alignment_range.hpp:151
constexpr sentinel end() noexcept
Returns a sentinel signaling the end of the alignment range.
Definition: alignment_range.hpp:208
constexpr bool eof() const noexcept
Returns whether the executor buffer reached is end.
Definition: alignment_range.hpp:234
::ranges::default_sentinel_t default_sentinel_t
Alias for ranges::default_sentinel_t. Type of ranges::default_sentinel.
Definition: iterator:351
::ranges::cend cend
Alias for ranges::cend. Returns an iterator to the end of a range.
Definition: ranges:214
~alignment_range()=default
Defaulted.
The alignment.
Definition: alignment_range.hpp:33
iterator_type iterator
The iterator type.
Definition: alignment_range.hpp:147