6#ifndef OPENCBDC_TX_SRC_SERIALIZATION_ISTREAM_SERIALIZER_H_
7#define OPENCBDC_TX_SRC_SERIALIZATION_ISTREAM_SERIALIZER_H_
35 auto write(
const void* data,
size_t len) ->
bool final;
43 auto read(
void* data,
size_t len) ->
bool final;
48 using off_type = std::remove_reference_t<
decltype(m_str)>::off_type;
Implementation of serializer for reading from a std::istream.
auto read(void *data, size_t len) -> bool final
Attempts to read the given number of bytes from the current position in the stream.
void advance_cursor(size_t len) final
Moves the stream forward without reading from the stream.
auto write(const void *data, size_t len) -> bool final
Not implemented for istream.
istream_serializer(std::istream &s)
Constructor.
void reset() final
Seeks the stream position to the beginning.
auto end_of_buffer() const -> bool final
Indicates whether the serializer has reached the end of the stream.
Implementation of serializer for std::ios.