PrepackedBuffer Class Reference

#include <PrepackedBuffer.h>

List of all members.

Public Member Functions

 PrepackedBuffer (const char *data, unsigned int dataSize, unsigned int numEntries=0)
 PrepackedBuffer (const PrepackedBuffer &other)
 PrepackedBuffer (const char *buf)
 PrepackedBuffer ()
 ~PrepackedBuffer ()
const char * data () const
const char * operator[] (unsigned int index) const
unsigned int dataSize () const
unsigned int size () const
unsigned int conv2buf (char *buf) const
unsigned int numEntries () const
bool isVector () const

Detailed Description

this class is used to take data that has already been converted into a buffer by one or more Conv<> operations, and send it between nodes. Useful when one doesn't know the data type being transferred.


Constructor & Destructor Documentation

PrepackedBuffer::PrepackedBuffer ( const char *  data,
unsigned int  dataSize,
unsigned int  numEntries = 0 
)

Constructor. Here data is a pointer to the entire data block. dataSize is the size of the entire data block to be transferred, dataSize = individualDataSize * numEntries. numEntries is the # of array entries. For non-arrays it defaults to 0.

PrepackedBuffer::PrepackedBuffer ( const PrepackedBuffer other  ) 
PrepackedBuffer::PrepackedBuffer ( const char *  buf  ) 

Constructor Here the char buffer is a serialized version of the Prepacked buffer

PrepackedBuffer::PrepackedBuffer (  ) 
PrepackedBuffer::~PrepackedBuffer (  ) 

Member Function Documentation

unsigned int PrepackedBuffer::conv2buf ( char *  buf  )  const

Converts to a buffer. Buf must be preallocated.

References size().

Here is the call graph for this function:

const char* PrepackedBuffer::data (  )  const [inline]
unsigned int PrepackedBuffer::dataSize (  )  const [inline]

Returns the size of the data contents.

bool PrepackedBuffer::isVector (  )  const [inline]

Flag: is the data type a single value or a vector?

unsigned int PrepackedBuffer::numEntries (  )  const [inline]

Returns number of data entries: size of transferred array.

const char * PrepackedBuffer::operator[] ( unsigned int  index  )  const

looks up entry. If index exceeds numEntries_, then goes back to beginning. Lets us tile the target with repeating sequences. Most commonly just repeat one entry.

unsigned int PrepackedBuffer::size (  )  const [inline]

Returns the size of the entire PrepackedBuffer converted to char*

Referenced by conv2buf().


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

Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1