Used to deserialize elements from a std::streambuf.
More...
#include <StreamManager.h>
|
typedef std::pair< Element *, int64_t > | StackElement |
| To store the (de)serializer position.
|
|
| StreamManager (std::streambuf *_streamBuffer) |
| Initalize from stream buffer.
|
|
std::unique_ptr< Element > | rootElement |
| The element at the root of the hierarchy.
|
|
std::vector< StackElement > | stack |
| The element hierarchy stack.
|
|
std::streambuf * | streamBuffer |
|
Used to deserialize elements from a std::streambuf.
◆ Deserializer()
MsgPack::Deserializer::Deserializer |
( |
std::streambuf * |
_streamBuffer | ) |
|
|
inline |
Constructs the Deserializer
- Parameters
-
_streamBuffer | A std::streambuf to be used as target for write operations |
◆ deserialize() [1/2]
std::streamsize MsgPack::Deserializer::deserialize |
( |
PushCallback |
pushElement, |
|
|
bool |
hierarchy = true , |
|
|
std::streamsize |
bytes = 0 |
|
) |
| |
Deserializes elements from the streamBuffer
- Parameters
-
pushElement | Callback which will be called when the next element has been deserialized and can return true to stop the deserialization |
hierarchy | If false arrays and maps will be deserialized as a flat stream of elements |
bytes | Limit of bytes to read or 0 to read as much as possible |
◆ deserialize() [2/2]
std::streamsize MsgPack::Deserializer::deserialize |
( |
std::unique_ptr< Element > & |
element, |
|
|
bool |
hierarchy = true , |
|
|
std::streamsize |
bytes = 0 |
|
) |
| |
Deserializes one element from the streamBuffer
- Parameters
-
element | std::unique_ptr in which the element will be stored |
hierarchy | If false arrays and maps will be deserialized as a flat stream of elements |
bytes | Limit of bytes to read or 0 to read as much as possible |
◆ operator>>()
Tries to deserialize one MsgPack::Element from the streamBuffer
- Parameters
-
element | std::unique_ptr in which the element will be stored |
The documentation for this class was generated from the following files: