|
Teuchos - Trilinos Tools Package
Version of the Day
|
Serialization traits for objects that support direct serialization. More...
#include <Teuchos_SerializationTraits.hpp>
Serialization traits for objects that support direct serialization.
"Direct" serialization means that you can convert directly between an object of type T and an array of char, of a specific length dependent only on the type T and not on the particular instance. Specifically, it means you can
1. reinterpret_cast a pointer to an instance of T into an array of char (which array has length dependent only on the type T and not on the specific T instance), 2. serialize the resulting array of char, and finally 3. deserialize by reading in the array of char and doing a reinterpret_cast back into a T.
"Indirect" serialization is defined as any serialization method more general than that.
We use partial specializations of DirectSerializationTraits (specialized on certain T types, not Ordinal) as public base classes for the corresponding SerializationTraits specialization. This provides high-performance default implementations of serialization for commonly used types T (including char, int, and double).
| Ordinal | The same template parameter as that of Comm. The integer type used to count the number of packets sent and received. |
| T | The type of the objects that this class shows how to serialize. |
Definition at line 307 of file Teuchos_SerializationTraits.hpp.
1.7.6.1