The "marshalled" type is a wrapper for already-serialized types;. More...
#include <SerializationSupport.hpp>
Public Member Functions | |
marshalled (decltype(size) size, decltype(data) data) | |
std::size_t | to_bytes (char *v) const |
Write this class's marshalled representation into the array found at v. More... | |
std::size_t | bytes_size () const |
the size of the marshalled representation of this object. More... | |
Public Member Functions inherited from mutils::ByteRepresentable | |
virtual void | post_object (const std::function< void(char const *const, std::size_t)> &) const =0 |
Pass a pointer to a buffer containing this class's marshalled representation into the function f. More... | |
virtual | ~ByteRepresentable () |
Static Public Member Functions | |
template<typename DSM > | |
static std::unique_ptr< marshalled > | from_bytes (DSM const *const, char const *const) |
static context_ptr< marshalled > | from_bytes_noalloc (DeserializationManager const *const, char *v) |
Public Attributes | |
const std::size_t | size |
char const *const | data |
The "marshalled" type is a wrapper for already-serialized types;.
Definition at line 422 of file SerializationSupport.hpp.
Definition at line 426 of file SerializationSupport.hpp.
|
inlinevirtual |
the size of the marshalled representation of this object.
useful when allocating arrays in which to store this object.
NOTE: it is recommended that users not call this directly, and prefer to use mutils::bytes_size(T,v) instead.
Implements mutils::ByteRepresentable.
Definition at line 434 of file SerializationSupport.hpp.
|
inlinestatic |
Definition at line 443 of file SerializationSupport.hpp.
|
static |
Definition at line 31 of file SerializationSupport.cpp.
|
inlinevirtual |
Write this class's marshalled representation into the array found at v.
assume v has at least bytes_size() of free memory available; behavior is undefined otherwise.
Returns number of bytes written, which should be the same as bytes_size().
NOTE: it is recommended that users not call this directly, and prefer to use mutils::to_bytes(T,v) instead.
Implements mutils::ByteRepresentable.
Definition at line 429 of file SerializationSupport.hpp.
char const* const mutils::marshalled::data |
Definition at line 424 of file SerializationSupport.hpp.
const std::size_t mutils::marshalled::size |
Definition at line 423 of file SerializationSupport.hpp.