|
static std::size_t | packed_size (T const &t) noexcept |
| Returns the packed (dynamic) size of the given object.
|
|
static std::pair< bool, std::size_t > | meets_requirements (const typer::pass_type p, T const &t) noexcept |
| Returns the packing requirements for pass p .
|
|
static void | prepack (T *dest, T const *src, const std::size_t num=1) noexcept |
| Performs any operations that need to be done before calling typer_traits::pack(). More...
|
|
static std::size_t | pack (T &dest, void *base, const std::size_t offset, T const &src) noexcept |
| Packs the object to the given buffer, returning its packed size. More...
|
|
static std::size_t | unpack (T &t, void *base) |
| Unpacks the object from the buffer, returning its packed size. More...
|
|
static void | destroy (T &t) noexcept |
| Cleans up after the unpacked object. More...
|
|
template<typename T, typename Enable>
class stapl::typer_traits< T, Enable >
Provides methods for assisting in packing and unpacking objects.
- Template Parameters
-
T | Object type to be packed. |
It has functions to determine the packing requirements, additional packed size requirements (e.g., objects that contain pointers require extra space to serialize the data pointed to), and implements the packing and unpacking functions.
The default typer_traits uses the class's define_type()
.
- See also
- typer