Teuchos::SerializationTraits< Ordinal, T > Class Template Reference

Serialization traits class for types that use value semantics. More...

#include <Teuchos_SerializationTraits.hpp>

List of all members.

Static Public Member Functions

Direct serialization functions (not defined if supportsDirectSerialization==false)
Ordinal fromCountToDirectBytes (const Ordinal count)
 Return the number of bytes for count objects.
char * convertToCharPtr (T *ptr)
 Convert the pointer type to char*.
const char * convertToCharPtr (const T *ptr)
 Convert the pointer type to const char*.
Ordinal fromDirectBytesToCount (const Ordinal bytes)
 Return the number of objects for bytes of storage.
T * convertFromCharPtr (char *ptr)
 Convert the pointer type from char*.
const T * convertFromCharPtr (const char *ptr)
 Convert the pointer type from char*.
Indirect serialization functions (always defined and supported)
Ordinal fromCountToIndirectBytes (const Ordinal count)
 Return the number of bytes for count objects.
void serialize (const Ordinal count, const T buffer[], const Ordinal bytes, char charBuffer[])
 Serialize to an indirect char[] buffer.
Ordinal fromIndirectBytesToCount (const Ordinal bytes)
 Return the number of objects for bytes of storage.
void deserialize (const Ordinal bytes, const char charBuffer[], const Ordinal count, T buffer[])
 Deserialize from an indirect char[] buffer.

Static Public Attributes

Seialization type selection
const bool supportsDirectSerialization = false
 Determines if the type supports direct serialization.


Detailed Description

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

Serialization traits class for types that use value semantics.

There are one of two modes associated with serialization.

ToDo: Finish documenation!

Definition at line 49 of file Teuchos_SerializationTraits.hpp.


Member Function Documentation

template<typename Ordinal, typename T>
Ordinal Teuchos::SerializationTraits< Ordinal, T >::fromCountToDirectBytes const Ordinal  count  )  [inline, static]
 

Return the number of bytes for count objects.

Definition at line 64 of file Teuchos_SerializationTraits.hpp.

template<typename Ordinal, typename T>
char* Teuchos::SerializationTraits< Ordinal, T >::convertToCharPtr T *  ptr  )  [inline, static]
 

Convert the pointer type to char*.

Definition at line 67 of file Teuchos_SerializationTraits.hpp.

template<typename Ordinal, typename T>
const char* Teuchos::SerializationTraits< Ordinal, T >::convertToCharPtr const T *  ptr  )  [inline, static]
 

Convert the pointer type to const char*.

Definition at line 70 of file Teuchos_SerializationTraits.hpp.

template<typename Ordinal, typename T>
Ordinal Teuchos::SerializationTraits< Ordinal, T >::fromDirectBytesToCount const Ordinal  bytes  )  [inline, static]
 

Return the number of objects for bytes of storage.

Definition at line 73 of file Teuchos_SerializationTraits.hpp.

template<typename Ordinal, typename T>
T* Teuchos::SerializationTraits< Ordinal, T >::convertFromCharPtr char *  ptr  )  [inline, static]
 

Convert the pointer type from char*.

Definition at line 76 of file Teuchos_SerializationTraits.hpp.

template<typename Ordinal, typename T>
const T* Teuchos::SerializationTraits< Ordinal, T >::convertFromCharPtr const char *  ptr  )  [inline, static]
 

Convert the pointer type from char*.

Definition at line 79 of file Teuchos_SerializationTraits.hpp.

template<typename Ordinal, typename T>
Ordinal Teuchos::SerializationTraits< Ordinal, T >::fromCountToIndirectBytes const Ordinal  count  )  [inline, static]
 

Return the number of bytes for count objects.

Definition at line 87 of file Teuchos_SerializationTraits.hpp.

template<typename Ordinal, typename T>
void Teuchos::SerializationTraits< Ordinal, T >::serialize const Ordinal  count,
const T  buffer[],
const Ordinal  bytes,
char  charBuffer[]
[inline, static]
 

Serialize to an indirect char[] buffer.

Parameters:
count [in] The number of objects to serialize.
buffer [in] The objects to serialize.
bytes [in] Number of bytes in charBuffer[]
charBuffer [out] Array (length bytes) containing the serialized objects.
Preconditions:
  • bytes==fromCountToIndirectBytes(count)

Definition at line 104 of file Teuchos_SerializationTraits.hpp.

template<typename Ordinal, typename T>
Ordinal Teuchos::SerializationTraits< Ordinal, T >::fromIndirectBytesToCount const Ordinal  bytes  )  [inline, static]
 

Return the number of objects for bytes of storage.

Definition at line 110 of file Teuchos_SerializationTraits.hpp.

template<typename Ordinal, typename T>
void Teuchos::SerializationTraits< Ordinal, T >::deserialize const Ordinal  bytes,
const char  charBuffer[],
const Ordinal  count,
buffer[]
[inline, static]
 

Deserialize from an indirect char[] buffer.

Parameters:
bytes [in] Number of bytes in charBuffer[]
charBuffer [in] Array (length bytes) containing the serialized objects.
count [in] The number of objects to deserialize.
buffer [out] The deserialized objects.
Preconditions:
  • count==fromIndirectBytesToCount(bytes)

Definition at line 127 of file Teuchos_SerializationTraits.hpp.


Member Data Documentation

template<typename Ordinal, typename T>
const bool Teuchos::SerializationTraits< Ordinal, T >::supportsDirectSerialization = false [static]
 

Determines if the type supports direct serialization.

Definition at line 56 of file Teuchos_SerializationTraits.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:30:32 2008 for Teuchos - Trilinos Tools Package by doxygen 1.3.9.1