template<class T>
struct KV_Type< T >
Template struct for making types serializable.
Specializations should implement the following methods:
getTypeID should return an arbitrary, unique identifier for the type.
getLength returns the size of the type in bytes.
writeToBuffer copies an object of the type into a byte buffer (it shouldn't write more than getLength() bytes).
readFromBuffer converts a buffer of bytes into an object of the type (it shouldn't read more than getLength() bytes).
When copying data from and to the buffer, don't break the strict aliasing rule and keep in mind that the compiler can add padding bytes to structs.
- Template Parameters
-
| T | The type to make serializable. |
Definition at line 43 of file KV_Types.hpp.