Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Static Public Member Functions | List of all members
Teuchos::DefaultSerializer< Ordinal, T > Class Template Reference

A class for instantiating a default serialization object. More...

#include <Teuchos_SerializationTraitsHelpers.hpp>

Public Types

typedef SerializationTraits
< Ordinal, T > 
DefaultSerializerType
 Typename of default serializer. More...
 

Static Public Member Functions

static DefaultSerializerType getDefaultSerializer ()
 Return an instance of the default serializer. More...
 
static Teuchos::RCP
< DefaultSerializerType
getDefaultSerializerRCP ()
 Return an RCP of an instance of the default serializer. More...
 

Detailed Description

template<typename Ordinal, typename T>
class Teuchos::DefaultSerializer< Ordinal, T >

A class for instantiating a default serialization object.

The serialization buffer classes below are generalized beyond using the SerializationTraits to use a general serialization object. This is to allow for more general types of serialization, e.g., when other data needs to be used.

Note
(mfh 16 Nov 2014) I honestly have no idea what the above comment means. My guess is that serializers should have little if any state, so there is probably no benefit to keeping around a static DefaultSerializerType object for every type T for which we might want to send and receive data. Furthermore, the deallocation of static objects requires careful management, in particular if they depend on MPI in any way. (I recommend using the "MPI_Finalize hook for MPI_COMM_SELF" idiom, as discussed in the MPI standard.) Thus, I've chosen to remove the static objects, and just return new instances each time.

Definition at line 70 of file Teuchos_SerializationTraitsHelpers.hpp.

Member Typedef Documentation

template<typename Ordinal, typename T>
typedef SerializationTraits<Ordinal,T> Teuchos::DefaultSerializer< Ordinal, T >::DefaultSerializerType

Typename of default serializer.

Definition at line 73 of file Teuchos_SerializationTraitsHelpers.hpp.

Member Function Documentation

template<typename Ordinal, typename T>
static DefaultSerializerType Teuchos::DefaultSerializer< Ordinal, T >::getDefaultSerializer ( )
inlinestatic

Return an instance of the default serializer.

Definition at line 76 of file Teuchos_SerializationTraitsHelpers.hpp.

template<typename Ordinal, typename T>
static Teuchos::RCP<DefaultSerializerType> Teuchos::DefaultSerializer< Ordinal, T >::getDefaultSerializerRCP ( )
inlinestatic

Return an RCP of an instance of the default serializer.

Definition at line 82 of file Teuchos_SerializationTraitsHelpers.hpp.


The documentation for this class was generated from the following file: