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:
object Input, 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:
object data to be packed.
buf buffer to be used for packed data.
size total size of buffer (for overrun check).
pos current 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:
object data to be unpacked.
buf buffer to be used for unpacking data.
size total size of buffer (for overrun check).
pos current 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:
Generated on Tue Jul 13 09:23:08 2010 for EpetraExt by  doxygen 1.4.7