Definition at line 39 of file test.cpp.
◆ VariableBytes()
VariableBytes::VariableBytes |
( |
| ) |
|
|
inline |
◆ bytes_size()
virtual std::size_t VariableBytes::bytes_size |
( |
| ) |
const |
|
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 57 of file test.cpp.
◆ ensure_registered()
◆ from_bytes()
◆ post_object()
virtual void VariableBytes::post_object |
( |
const std::function< void(char const *const, std::size_t)> & |
| ) |
const |
|
inlinevirtual |
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 53 of file test.cpp.
◆ to_bytes()
virtual std::size_t VariableBytes::to_bytes |
( |
char * |
v | ) |
const |
|
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 48 of file test.cpp.
◆ to_string()
virtual std::string VariableBytes::to_string |
( |
| ) |
|
|
inlinevirtual |
◆ buf
◆ data_len
std::size_t VariableBytes::data_len |
The documentation for this class was generated from the following file: