Used to serialize elements into 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 serialize elements into a std::streambuf.
◆ Serializer()
MsgPack::Serializer::Serializer |
( |
std::streambuf * |
_streamBuffer | ) |
|
|
inline |
Constructs the Serializer
- Parameters
-
_streamBuffer | A std::streambuf to be used as target for read operations |
◆ operator<<() [1/2]
Serializer & MsgPack::Serializer::operator<< |
( |
std::unique_ptr< Element > && |
element | ) |
|
|
inline |
Tries to serialize one MsgPack::Element into the streamBuffer
- Parameters
-
element | std::unique_ptr containing the element |
◆ operator<<() [2/2]
Tries to serialize one MsgPack::Element into the streamBuffer
- Parameters
-
element | std::unique_ptr containing the element |
◆ serialize() [1/2]
std::streamsize MsgPack::Serializer::serialize |
( |
PullCallback |
pullElement, |
|
|
std::streamsize |
bytes = 0 |
|
) |
| |
Pulls elements and writes them into the streamBuffer
- Parameters
-
pullElement | Callback which will be called to get the next element |
bytes | Limit of bytes to write or 0 to write as much as possible |
◆ serialize() [2/2]
std::streamsize MsgPack::Serializer::serialize |
( |
std::unique_ptr< Element > & |
element, |
|
|
std::streamsize |
bytes = 0 |
|
) |
| |
Tries to serialize one MsgPack::Element into the streamBuffer
- Parameters
-
element | std::unique_ptr containing the element |
bytes | Limit of bytes to write or 0 to write as much as possible |
The documentation for this class was generated from the following files: