SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
The type returned by seqan3::views::take, seqan3::detail::take_exactly and seqan3::detail::take_exactly_or_throw. More...
#include <seqan3/io/views/detail/take_exactly_view.hpp>
Classes | |
class | basic_iterator |
The forward declared iterator type. More... | |
Public Member Functions | |
constexpr auto | size () const noexcept |
Returns the number of elements in the view. | |
Constructors, destructor and assignment | |
view_take_exactly ()=default | |
Defaulted. | |
view_take_exactly (view_take_exactly const &rhs)=default | |
Defaulted. | |
view_take_exactly (view_take_exactly &&rhs)=default | |
Defaulted. | |
view_take_exactly & | operator= (view_take_exactly const &rhs)=default |
Defaulted. | |
view_take_exactly & | operator= (view_take_exactly &&rhs)=default |
Defaulted. | |
~view_take_exactly ()=default | |
Defaulted. | |
constexpr | view_take_exactly (urng_t _urange, size_t const _size) |
Construct from another View. | |
template<std::ranges::viewable_range rng_t> requires std::constructible_from<rng_t, std::views::all_t<rng_t>> | |
constexpr | view_take_exactly (rng_t &&_urange, size_t const _size) |
Construct from another viewable_range. | |
Iterators | |
constexpr auto | begin () noexcept |
Returns an iterator to the first element of the container. | |
constexpr auto | begin () const noexcept |
Returns an iterator to the first element of the container. | |
constexpr auto | end () noexcept |
Returns an iterator to the element following the last element of the range. | |
constexpr auto | end () const noexcept |
Returns an iterator to the element following the last element of the range. | |
Private Types | |
Associated types | |
using | iterator = basic_iterator< false > |
The iterator type of this view (a random access iterator). | |
using | const_iterator = basic_iterator< true > |
Note that this declaration does not give any compiler errors for non-const iterable ranges. Although basic_iterator inherits from std::ranges::iterator_t which is not defined on a const-range, i.e. `urng_t const, if it is not const-iterable. We only just declare this type and never instantiate it, i.e. use this type within this class, if the underlying range is not const-iterable. | |
Private Attributes | |
size_t | target_size |
The desired target_size. | |
urng_t | urange |
The underlying range. | |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename urng_t , bool or_throw = false> | |
view_take_exactly (urng_t &&, size_t) -> view_take_exactly< std::views::all_t< urng_t >, or_throw > | |
Template argument type deduction guide that strips references. | |
The type returned by seqan3::views::take, seqan3::detail::take_exactly and seqan3::detail::take_exactly_or_throw.
urng_t | The type of the underlying ranges, must satisfy seqan3::views::concept. |
or_throw | Whether to throw an exception when the input is exhausted before the end of line is reached. |
Note that most members of this class are generated by std::ranges::view_interface which is not yet documented here.
|
inlineconstexpr |
Construct from another View.
[in] | _urange | The underlying range. |
[in] | _size | The desired size (after which to stop returning elements). |
unexpected_end_of_input | If or_throw && seqan3::sized_range<urng_t> . |
|
inlineconstexpr |
Construct from another viewable_range.
rng_t | Type of the passed range; urng_t must be constructible from this. |
[in] | _urange | The underlying range. |
[in] | _size | The desired size (after which to stop returning elements). |
unexpected_end_of_input | If or_throw && seqan3::sized_range<urng_t> . |
|
inlineconstexprnoexcept |
Returns an iterator to the first element of the container.
If the container is empty, the returned iterator will be equal to end().
Constant.
No-throw guarantee.
|
inlineconstexprnoexcept |
Returns an iterator to the first element of the container.
If the container is empty, the returned iterator will be equal to end().
Constant.
No-throw guarantee.
|
inlineconstexprnoexcept |
Returns an iterator to the element following the last element of the range.
This element acts as a placeholder; attempting to dereference it results in undefined behaviour.
Constant.
No-throw guarantee.
|
inlineconstexprnoexcept |
Returns an iterator to the element following the last element of the range.
This element acts as a placeholder; attempting to dereference it results in undefined behaviour.
Constant.
No-throw guarantee.
|
inlineconstexprnoexcept |
Returns the number of elements in the view.
Constant.
No-throw guarantee.