Dakota  Version
Explore and Predict with Confidence
Public Member Functions | Protected Attributes | List of all members
MPIUnpackBuffer Class Reference

Class for unpacking MPI message buffers. More...

Public Member Functions

void setup (char *buf_, int size_, bool flag_=false)
 Method that does the setup for the constructors.
 
 MPIUnpackBuffer ()
 Default constructor.
 
 MPIUnpackBuffer (int size_)
 Constructor that specifies the size of the buffer.
 
 MPIUnpackBuffer (char *buf_, int size_, bool flag_=false)
 Constructor that sets the internal buffer to the given array.
 
 ~MPIUnpackBuffer ()
 Destructor.
 
void resize (const int newsize)
 Resizes the internal buffer.
 
const char * buf ()
 Returns a pointer to the internal buffer.
 
int size ()
 Returns the length of the buffer.
 
int curr ()
 Returns the number of bytes that have been unpacked from the buffer.
 
void reset ()
 Resets the index of the internal buffer.
 
void unpack (int *data, const int num=1)
 Unpack one or more int's.
 
void unpack (u_int *data, const int num=1)
 Unpack one or more unsigned int's.
 
void unpack (long *data, const int num=1)
 Unpack one or more long's.
 
void unpack (u_long *data, const int num=1)
 Unpack one or more unsigned long's.
 
void unpack (long long *data, const int num=1)
 Unpack one or more long long's.
 
void unpack (unsigned long long *data, const int num=1)
 Unpack one or more unsigned long long's.
 
void unpack (short *data, const int num=1)
 Unpack one or more short's.
 
void unpack (u_short *data, const int num=1)
 Unpack one or more unsigned short's.
 
void unpack (char *data, const int num=1)
 Unpack one or more char's.
 
void unpack (u_char *data, const int num=1)
 Unpack one or more unsigned char's.
 
void unpack (double *data, const int num=1)
 Unpack one or more double's.
 
void unpack (float *data, const int num=1)
 Unpack one or more float's.
 
void unpack (bool *data, const int num=1)
 Unpack one or more bool's.
 
void unpack (int &data)
 Unpack a int.
 
void unpack (u_int &data)
 Unpack a unsigned int.
 
void unpack (long &data)
 Unpack a long.
 
void unpack (u_long &data)
 Unpack a unsigned long.
 
void unpack (long long &data)
 Unpack a long long.
 
void unpack (unsigned long long &data)
 Unpack a unsigned long long.
 
void unpack (short &data)
 Unpack a short.
 
void unpack (u_short &data)
 Unpack a unsigned short.
 
void unpack (char &data)
 Unpack a char.
 
void unpack (u_char &data)
 Unpack a unsigned char.
 
void unpack (double &data)
 Unpack a double.
 
void unpack (float &data)
 Unpack a float.
 
void unpack (bool &data)
 Unpack a bool.
 

Protected Attributes

char * Buffer
 The internal buffer for unpacking.
 
int Index
 The index into the current buffer.
 
int Size
 The total size that has been allocated for the buffer.
 
bool ownFlag
 If TRUE, then this class owns the internal buffer.
 

Detailed Description

Class for unpacking MPI message buffers.

A class that provides a facility for unpacking message buffers using the MPI_Unpack facility. This class is based on the Dakota_Version_3_0 version of utilib::UnPackBuffer from utilib/src/io/PackBuf.[cpp,h]


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