MsgPack::Header with a additional buffer used as body.
More...
#include <Data.h>
|
| std::streamsize | serialize (int64_t &pos, std::basic_streambuf< char > *streamBuffer, std::streamsize bytes) |
| | Serializes bytes at the given serializer position pos into streamBuffer.
|
| |
| std::streamsize | deserialize (int64_t &pos, std::basic_streambuf< char > *streamBuffer, std::streamsize bytes) |
| | Deserializes bytes at the given deserializer position pos from streamBuffer.
|
| |
| virtual int64_t | startSerialize () |
| | Returns the initial serializer position in bytes (negative value if there is a header)
|
| |
| virtual int64_t | startDeserialize (uint8_t firstByte)=0 |
| | Reads in one byte and returns the initial deserializer position in bytes (negative value if there is a header)
|
| |
| virtual std::streamsize | serialize (int64_t &pos, std::basic_streambuf< char > *streamBuffer, std::streamsize bytes)=0 |
| | Serializes bytes at the given serializer position pos into streamBuffer.
|
| |
| virtual std::streamsize | deserialize (int64_t &pos, std::basic_streambuf< char > *streamBuffer, std::streamsize bytes) |
| | Deserializes bytes at the given deserializer position pos from streamBuffer.
|
| |
| virtual bool | containerDeserialized () |
| | Returns true if the header of a container is deserialized and reserves the necessary space for its element vector.
|
| |
| virtual std::vector< std::unique_ptr< Element > > * | getElementsVector () |
| | Returns a raw pointer to the element vector of a container.
|
| |
| virtual int64_t | getEndPos () const =0 |
| | Returns the first invalid (de)serializer position.
|
| |
|
|
std::unique_ptr< char[]> | data |
| | The raw data buffer.
|
| |
|
|
class | Serializer |
| |
|
class | Deserializer |
| |
|
| virtual std::unique_ptr< Element > | copy () const =0 |
| | Creates a deep copy of this element.
|
| |
| virtual void | toJSON (std::ostream &stream) const =0 |
| | Writes a human readable JSON-like string into the given stream.
|
| |
| virtual Type | getType () const =0 |
| | Returns the MsgPack::Type.
|
| |
| virtual uint32_t | getSizeInBytes () const |
| | Returns the size in bytes this MsgPack::Element takes if completely serialized.
|
| |
MsgPack::Header with a additional buffer used as body.
◆ deserialize()
| std::streamsize MsgPack::Data::deserialize |
( |
int64_t & |
pos, |
|
|
std::basic_streambuf< char > * |
streamBuffer, |
|
|
std::streamsize |
bytes |
|
) |
| |
|
protectedvirtual |
Deserializes bytes at the given deserializer position pos from streamBuffer.
Reimplemented from MsgPack::Element.
◆ serialize()
| std::streamsize MsgPack::Data::serialize |
( |
int64_t & |
pos, |
|
|
std::basic_streambuf< char > * |
streamBuffer, |
|
|
std::streamsize |
bytes |
|
) |
| |
|
protectedvirtual |
Serializes bytes at the given serializer position pos into streamBuffer.
Implements MsgPack::Element.
The documentation for this class was generated from the following files:
- include/Data.h
- src/MsgPack.cpp