EpetraExt Development
Static Public Member Functions
EpetraExt::PackTraits< T > Struct Template Reference

Traits for packing and unpacking of data into char buffers for communication. More...

#include <EpetraExt_PackTraits.h>

List of all members.

Static Public Member Functions

static size_t size (T const &object)
 Returns size in byte necessary to pack datatype.
static void pack (T const &object, char *buf, size_t size, int &pos)
 Packs object into char buffer.
static void unpack (T &object, char *buf, size_t size, int &pos)
 Unpacks object from char buffer.

Detailed Description

template<typename T>
struct EpetraExt::PackTraits< T >

Traits for packing and unpacking of data into char buffers for communication.

Should be replaced by something more generic in Teuchos.

Definition at line 49 of file EpetraExt_PackTraits.h.


Member Function Documentation

template<typename T >
static size_t EpetraExt::PackTraits< T >::size ( T const &  object) [inline, static]

Returns size in byte necessary to pack datatype.

Parameters:
objectInput, object to be sized for packing.
Returns:
Size in bytes needed for packed object.

Definition at line 57 of file EpetraExt_PackTraits.h.

template<typename T >
static void EpetraExt::PackTraits< T >::pack ( T const &  object,
char *  buf,
size_t  size,
int &  pos 
) [inline, static]

Packs object into char buffer.

Parameters:
objectdata to be packed.
bufbuffer to be used for packed data.
sizetotal size of buffer (for overrun check).
poscurrent position in buffer for packing.

Definition at line 67 of file EpetraExt_PackTraits.h.

template<typename T >
static void EpetraExt::PackTraits< T >::unpack ( T &  object,
char *  buf,
size_t  size,
int &  pos 
) [inline, static]

Unpacks object from char buffer.

Parameters:
objectdata to be unpacked.
bufbuffer to be used for unpacking data.
sizetotal size of buffer (for overrun check).
poscurrent position in buffer for unpacking.

Definition at line 77 of file EpetraExt_PackTraits.h.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines