OpenCBDC Transaction Processor
|
Implementation of serializer for reading from a std::istream. More...
#include <istream_serializer.hpp>
Public Member Functions | |
istream_serializer (std::istream &s) | |
Constructor. | |
auto | end_of_buffer () const -> bool final |
Indicates whether the serializer has reached the end of the stream. | |
void | advance_cursor (size_t len) final |
Moves the stream forward without reading from the stream. | |
void | reset () final |
Seeks the stream position to the beginning. | |
auto | write (const void *data, size_t len) -> bool final |
Not implemented for 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. | |
![]() | |
stream_serializer (std::ios &s) | |
Constructor. | |
operator bool () const final | |
Indicates whether the last serialization operation succeeded. | |
![]() | |
virtual | ~serializer ()=default |
serializer (const serializer &)=delete | |
auto | operator= (const serializer &)=delete |
serializer (serializer &&)=delete | |
auto | operator= (serializer &&)=delete |
Additional Inherited Members | |
![]() | |
serializer ()=default | |
Implementation of serializer for reading from a std::istream.
Definition at line 16 of file istream_serializer.hpp.
|
explicit |
Constructor.
s | istream to serialize from. |
Definition at line 12 of file istream_serializer.cpp.
|
finalvirtual |
Moves the stream forward without reading from the stream.
len | number of bytes by which to move the stream forward. |
Implements cbdc::serializer.
Definition at line 26 of file istream_serializer.cpp.
|
nodiscardfinalvirtual |
Indicates whether the serializer has reached the end of the stream.
Implements cbdc::serializer.
Definition at line 16 of file istream_serializer.cpp.
|
finalvirtual |
Attempts to read the given number of bytes from the current position in the stream.
data | memory location to write the bytes. |
len | number of bytes to read from the stream. |
Implements cbdc::serializer.
Definition at line 41 of file istream_serializer.cpp.
|
finalvirtual |
Seeks the stream position to the beginning.
Implements cbdc::serializer.
Definition at line 30 of file istream_serializer.cpp.
|
finalvirtual |
Not implemented for istream.
Implements cbdc::serializer.
Definition at line 35 of file istream_serializer.cpp.