#include <Object.hpp>
Public Member Functions | |
Blob (const char *const b, const decltype(size) s) | |
Blob (const Blob &other) | |
Blob (Blob &&other) | |
Blob () | |
virtual | ~Blob () |
Blob & | operator= (Blob &&other) |
Blob & | operator= (const Blob &other) |
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... | |
void | post_object (const std::function< void(char const *const, std::size_t)> &f) const |
Pass a pointer to a buffer containing this class's marshalled representation into the function f. More... | |
void | ensure_registered (mutils::DeserializationManager &) |
mutils::context_ptr< Blob > | from_bytes_noalloc (mutils::DeserializationManager *ctx, const char *const v, mutils::context_ptr< Blob >=mutils::context_ptr< Blob >{}) |
Public Member Functions inherited from mutils::ByteRepresentable | |
virtual | ~ByteRepresentable () |
Static Public Member Functions | |
static std::unique_ptr< Blob > | from_bytes (mutils::DeserializationManager *, const char *const v) |
Public Attributes | |
char * | bytes |
std::size_t | size |
Definition at line 26 of file Object.hpp.
objectstore::Blob::Blob | ( | const char *const | b, |
const decltype(size) | s | ||
) |
Definition at line 5 of file Object.cpp.
objectstore::Blob::Blob | ( | const Blob & | other | ) |
Definition at line 14 of file Object.cpp.
objectstore::Blob::Blob | ( | Blob && | other | ) |
Definition at line 23 of file Object.cpp.
objectstore::Blob::Blob | ( | ) |
Definition at line 29 of file Object.cpp.
|
virtual |
Definition at line 31 of file Object.cpp.
|
virtual |
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 67 of file Object.cpp.
|
inline |
Definition at line 59 of file Object.hpp.
|
static |
Definition at line 81 of file Object.cpp.
mutils::context_ptr< Blob > objectstore::Blob::from_bytes_noalloc | ( | mutils::DeserializationManager * | ctx, |
const char *const | v, | ||
mutils::context_ptr< Blob > | = mutils::context_ptr<Blob>{} |
||
) |
Definition at line 77 of file Object.cpp.
Definition at line 35 of file Object.cpp.
Definition at line 45 of file Object.cpp.
|
virtual |
Pass a pointer to a buffer containing this class's marshalled representation into the function f.
This pointer is not guaranteed to live beyond the duration of the call to f, so make a copy if you need to keep it around.
NOTE: it is recommended that users not call this directly, and prefer to use mutils::post_object(f,T) instead.
Implements mutils::ByteRepresentable.
Definition at line 71 of file Object.cpp.
|
virtual |
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 59 of file Object.cpp.
char* objectstore::Blob::bytes |
Definition at line 28 of file Object.hpp.
std::size_t objectstore::Blob::size |
Definition at line 29 of file Object.hpp.