Serialization helper.
More...
#include <misc/pv/serializeHelper.h>
|
static void | writeSize (std::size_t s, ByteBuffer *buffer, SerializableControl *flusher) |
|
static std::size_t | readSize (ByteBuffer *buffer, DeserializableControl *control) |
|
static void | serializeString (const std::string &value, ByteBuffer *buffer, SerializableControl *flusher) |
|
static void | serializeSubstring (const std::string &value, std::size_t offset, std::size_t count, ByteBuffer *buffer, SerializableControl *flusher) |
|
static std::string | deserializeString (ByteBuffer *buffer, DeserializableControl *control) |
|
Serialization helper.
Definition at line 29 of file serializeHelper.h.
std::string deserialization helper method. TODO This method cannot return "null", but Java implementation could have serialized "null" value as well. We need to decide how to deserialize "null".
- Parameters
-
[in] | buffer | deserialization buffer |
[in] | control | control |
- Returns
- deserialized string
- Todo:
- This method cannot return "null", but Java implementation could have serialized "null" value as well. We need to decide how to deserialize "null".
Deserialize array size. The specified DeserializableControl ensures sufficient bytes are available.
- Parameters
-
- Returns
- array size.
std::string serialization helper method.
- Parameters
-
[in] | value | std::string to serialize |
[in] | buffer | serialization buffer |
[in] | flusher | flusher |
std::string serialization helper method.
- Parameters
-
[in] | value | std::string to serialize |
[in] | offset | start of the substring in value |
[in] | count | the number of characters to write |
[in] | buffer | serialization buffer |
[in] | flusher | flusher |
Serialize the specified array size into the specified buffer, flushing when necessary. The specified SerializableControl manages any flushing required.
- Parameters
-
[in] | s | size to encode |
[in] | buffer | serialization buffer |
[in] | flusher | SerializableControl to manage the flushing |
The documentation for this class was generated from the following file: