EpetraExt  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | List of all members
EpetraExt::PackTraits< T > Struct Template Reference

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

#include <EpetraExt_PackTraits.h>

Static Public Member Functions

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

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 68 of file EpetraExt_PackTraits.h.

Member Function Documentation

template<typename T >
static size_t EpetraExt::PackTraits< T >::size ( T const &  object)
inlinestatic

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 76 of file EpetraExt_PackTraits.h.

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

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 86 of file EpetraExt_PackTraits.h.

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

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 96 of file EpetraExt_PackTraits.h.


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