|
cpp-msgpack-light 0.3.0
A light library to serialize MessagePack.
|
Class of streams to write data to memory. More...
#include <msgpack_light/memory_output_stream.h>
Public Member Functions | |
| memory_output_stream () | |
| Constructor. | |
| const binary & | as_binary () const |
| Get the data as msgpack_light::binary instance. | |
| void | clear () |
| Clear data. | |
| const unsigned char * | data () const noexcept |
| Get the pointer to the written data. | |
| std::size_t | size () const noexcept |
| Get the size of the written data. | |
| void | write (const unsigned char *data, std::size_t size) override |
| Write data. | |
| Public Member Functions inherited from msgpack_light::output_stream | |
| output_stream ()=default | |
| Constructor. | |
Private Attributes | |
| binary | buffer_ {} |
| Buffer. | |
Static Private Attributes | |
| static constexpr std::size_t | initial_buffer_size = 4096U |
| Size of the initial buffer. | |
Additional Inherited Members | |
| Protected Member Functions inherited from msgpack_light::output_stream | |
| output_stream (const output_stream &)=default | |
| Copy constructor. | |
| output_stream (output_stream &&)=default | |
| Move constructor. | |
| ~output_stream ()=default | |
| Destructor. | |
| output_stream & | operator= (const output_stream &)=default |
| Copy assignment operator. | |
| output_stream & | operator= (output_stream &&)=default |
| Move assignment operator. | |
Class of streams to write data to memory.
Definition at line 33 of file memory_output_stream.h.
|
inline |
Constructor.
Definition at line 38 of file memory_output_stream.h.
|
inlinenodiscard |
Get the data as msgpack_light::binary instance.
Definition at line 76 of file memory_output_stream.h.
|
inline |
Clear data.
Definition at line 53 of file memory_output_stream.h.
|
inlinenodiscardnoexcept |
Get the pointer to the written data.
Definition at line 60 of file memory_output_stream.h.
|
inlinenodiscardnoexcept |
Get the size of the written data.
Definition at line 69 of file memory_output_stream.h.
|
inlineoverridevirtual |
Write data.
| [in] | data | Pointer to the data. |
| [in] | size | Size of the data. |
Implements msgpack_light::output_stream.
Definition at line 46 of file memory_output_stream.h.
|
private |
Buffer.
Definition at line 85 of file memory_output_stream.h.
|
staticconstexprprivate |
Size of the initial buffer.
Definition at line 80 of file memory_output_stream.h.