Teuchos - Trilinos Tools Package
Version of the Day
|
Serialization class for types T that use value semantics. More...
#include <Teuchos_SerializationTraits.hpp>
Additional Inherited Members | |
Static Public Member Functions inherited from Teuchos::SerializationTraits< Ordinal, T > | |
static Ordinal | fromCountToDirectBytes (const Ordinal count) |
Return the number of bytes for count objects. More... | |
static char * | convertToCharPtr (T *ptr) |
Convert the pointer type to char* . More... | |
static const char * | convertToCharPtr (const T *ptr) |
Convert the pointer type to const char* . More... | |
static Ordinal | fromDirectBytesToCount (const Ordinal bytes) |
Return the number of objects for bytes of storage. More... | |
static T * | convertFromCharPtr (char *ptr) |
Convert the pointer type from char* . More... | |
static const T * | convertFromCharPtr (const char *ptr) |
Convert the pointer type from char* . More... | |
static Ordinal | fromCountToIndirectBytes (const Ordinal count, const T buffer[]) |
Return the number of bytes for count objects. More... | |
static void | serialize (const Ordinal count, const T buffer[], const Ordinal bytes, char charBuffer[]) |
Serialize to an indirect char[] buffer. More... | |
static Ordinal | fromIndirectBytesToCount (const Ordinal bytes, const char charBuffer[]) |
Return the number of objects for bytes of storage. More... | |
static void | deserialize (const Ordinal bytes, const char charBuffer[], const Ordinal count, T buffer[]) |
Deserialize from an indirect char[] buffer. More... | |
Static Public Attributes inherited from Teuchos::SerializationTraits< Ordinal, T > | |
static const bool | supportsDirectSerialization = false |
Whether the type T supports direct serialization. More... | |
Serialization class for types T that use value semantics.
This works similarly to SerializationTraits, except that it provides a class that can be specialized for types T to implement serialization through an object instead of a traits class. Some types need other data to help them serialize, and that data can be encapsulated into a non-static specialization of this class.
The default implementation is just given by the SerializationTraits for the type T, and thus this class will be defined for any type that defines its SerializationTraits.
Definition at line 276 of file Teuchos_SerializationTraits.hpp.