|
OpenCBDC Transaction Processor
|
Implementation of serializer for std::ios. More...
#include <stream_serializer.hpp>


Public Member Functions | |
| stream_serializer (std::ios &s) | |
| Constructor. | |
| operator bool () const final | |
| Indicates whether the last serialization operation succeeded. | |
Public Member Functions inherited from cbdc::serializer | |
| virtual | ~serializer ()=default |
| serializer (const serializer &)=delete | |
| auto | operator= (const serializer &)=delete |
| serializer (serializer &&)=delete | |
| auto | operator= (serializer &&)=delete |
| virtual void | advance_cursor (size_t len)=0 |
| Moves the serialization cursor forward by the given number of bytes. | |
| virtual void | reset ()=0 |
| Resets the cursor to the start of the buffer. | |
| virtual auto | end_of_buffer () const -> bool=0 |
| Indicates whether the cursor is at or beyond the end of the buffer. | |
| virtual auto | write (const void *data, size_t len) -> bool=0 |
| Attempts to write the given raw data into the buffer starting at the current cursor position. | |
| virtual auto | read (void *data, size_t len) -> bool=0 |
| Attempts to read the requested number of bytes from the current cursor position into the given memory location. | |
Additional Inherited Members | |
Protected Member Functions inherited from cbdc::serializer | |
| serializer ()=default | |
Implementation of serializer for std::ios.
Cannot be used directly. Must be specialized for the stream type.
Definition at line 18 of file stream_serializer.hpp.
|
explicit |
Constructor.
| s | IO stream to serialize into or from. |
Definition at line 9 of file stream_serializer.cpp.
|
explicitfinalvirtual |
Indicates whether the last serialization operation succeeded.
Implements cbdc::serializer.
Definition at line 11 of file stream_serializer.cpp.