![]() |
fpmas 1.6
|
#include <datapack.h>
Static Public Member Functions | |
template<typename PackType > | |
static std::size_t | size (const PackType &, const std::string &str) |
template<typename PackType > | |
static void | to_datapack (PackType &pack, const std::string &str) |
template<typename PackType > | |
static std::string | from_datapack (const PackType &pack) |
std::string Serializer specialization.
| Serialization Scheme || | str.size() | str.data() (char array) ||
|
inlinestatic |
Returns the buffer size, in bytes, required to serialize an std::string instance, i.e. sizeof(std::size_t)+str.size()
.
Notice that this does not depend upon the current PackType, since the std::string is directly copied to the internal PackType DataPack buffer.
|
inlinestatic |
Writes str
to the pack
buffer.
pack | destination BasicObjectPack |
str | source string |
|
inlinestatic |
Reads an std::string from the pack
buffer.
pack | source BasicObjectPack |