SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
Functionally the same as std::istreambuf_iterator, but faster. More...
#include <seqan3/io/stream/detail/fast_istreambuf_iterator.hpp>
Public Types | |
Associated types | |
using | difference_type = ptrdiff_t |
Defaults to ptrdiff_t. | |
using | value_type = char_t |
The char type of the stream. | |
using | reference = char_t |
The char type of the stream. | |
using | pointer = void |
Has no pointer type. | |
using | iterator_category = std::input_iterator_tag |
Public Member Functions | |
std::string_view | cache_bytes (int32_t const size) |
Cache size bytes from input stream. | |
template<typename record_type > requires std::same_as<std::ranges::range_value_t<record_type>, std::string_view> | |
void | cache_record_into (char const record_end, char const field_sep, record_type &raw_record) |
Cache until raw_record.size() - 1 occurrences of field_sep followed by record_end were found. | |
reference | operator* () const |
Read current value from buffer (no vtable lookup, safe if not at end). | |
Constructors, destructor and assignment | |
fast_istreambuf_iterator () noexcept=default | |
Defaulted. | |
fast_istreambuf_iterator (fast_istreambuf_iterator const &) noexcept=default | |
Defaulted. | |
fast_istreambuf_iterator (fast_istreambuf_iterator &&) noexcept=default | |
Defaulted. | |
fast_istreambuf_iterator & | operator= (fast_istreambuf_iterator const &) noexcept=default |
Defaulted. | |
fast_istreambuf_iterator & | operator= (fast_istreambuf_iterator &&) noexcept=default |
Defaulted. | |
~fast_istreambuf_iterator () noexcept=default | |
Defaulted. | |
fast_istreambuf_iterator (std::basic_streambuf< char_t, traits_t > &ibuf) | |
Construct from a stream buffer. | |
Arithmetic operators | |
fast_istreambuf_iterator & | operator++ () |
Advance by one and rebuffer if necessary (vtable lookup iff rebuffering). | |
void | operator++ (int) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Private Attributes | |
std::string | overflow_buffer {} |
Place to store a range of characters that overlaps stream buffer boundaries. | |
stream_buffer_exposer< char_t, traits_t > * | stream_buf = nullptr |
Down-cast pointer to the stream-buffer. | |
Friends | |
Comparison operators | |
We define comparison only against the sentinel. | |
bool | operator== (fast_istreambuf_iterator const &lhs, std::default_sentinel_t const &) noexcept |
True if the read buffer is not empty; involves no vtable lookup. | |
bool | operator!= (fast_istreambuf_iterator const &lhs, std::default_sentinel_t const &) noexcept |
True if the read buffer is empty; involves no vtable lookup. | |
bool | operator== (std::default_sentinel_t const &, fast_istreambuf_iterator const &rhs) noexcept |
True if the read buffer is not empty; involves no vtable lookup. | |
bool | operator!= (std::default_sentinel_t const &, fast_istreambuf_iterator const &rhs) noexcept |
True if the read buffer is empty; involves no vtable lookup. | |
Functionally the same as std::istreambuf_iterator, but faster.
char_t | The stream's character type. |
traits_t | The stream's traits type. |
Performs less virtual function calls than std::istreambuf_iterator.
using seqan3::detail::fast_istreambuf_iterator< char_t, traits_t >::iterator_category = std::input_iterator_tag |
Pure input iterator.