SAMRAI::tbox::XDRStream Class Reference

#include <source/toolbox/stream/XDRStream.h>

Inheritance diagram for SAMRAI::tbox::XDRStream:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 XDRStream ()
void setXDRStream (XDR *xdrs)
virtual ~XDRStream ()
Boolean Stream Primitives
Pack and unpack booleans into and out of the XDR data stream.

virtual AbstractStreamoperator<< (const bool &data)
 Pack a single bool into the XDR data stream.
virtual AbstractStreamoperator>> (bool &data)
 Remove a single bool from the XDR data stream.
virtual void pack (const bool *data, const int n=1)
 Pack an array of bools into the XDR data stream.
virtual void unpack (bool *data, const int n=1)
 Remove an array of bools from the XDR data stream.
Character Stream Primitives
Pack and unpack chars into and out of the XDR data stream.

virtual AbstractStreamoperator<< (const char &data)
 Pack a single char into the XDR data stream.
virtual AbstractStreamoperator>> (char &data)
 Remove a single char from the XDR data stream.
virtual void pack (const char *data, const int n=1)
 Pack an array of chars into the XDR data stream.
virtual void unpack (char *data, const int n=1)
 Remove an array of chars from the XDR data stream.
virtual void writeString (const char *data)
 Write a string into the XDR data stream.
Double Complex Stream Primitives
Pack and unpack double complex into and out of the message stream.

virtual AbstractStreamoperator<< (const dcomplex &data)
 Pack a single double complex into the message stream.
virtual AbstractStreamoperator>> (dcomplex &data)
 Remove a single double complex from the message stream.
virtual void pack (const dcomplex *data, const int n=1)
 Pack an array of double complex into the message stream.
virtual void unpack (dcomplex *data, const int n=1)
 Remove an array of double complex from the message stream.
Double Stream Primitives
Pack and unpack doubles into and out of the XDR data stream.

virtual AbstractStreamoperator<< (const double &data)
 Pack a single double into the XDR data stream.
virtual AbstractStreamoperator>> (double &data)
 Remove a single double from the XDR data stream.
virtual void pack (const double *data, const int n=1)
 Pack an array of doubles into the XDR data stream.
virtual void unpack (double *data, const int n=1)
 Remove an array of doubles from the XDR data stream.
Float Stream Primitives
Pack and unpack floats into and out of the XDR data stream.

virtual AbstractStreamoperator<< (const float &data)
 Pack a single float into the XDR data stream.
virtual AbstractStreamoperator>> (float &data)
 Remove a single float from the XDR data stream.
virtual void pack (const float *data, const int n=1)
 Pack an array of floats into the XDR data stream.
virtual void unpack (float *data, const int n=1)
 Remove an array of floats from the XDR data stream.
Integer Stream Primitives
Pack and unpack integers into and out of the XDR data stream.

virtual AbstractStreamoperator<< (const int &data)
 Pack a single integer into the XDR data stream.
virtual AbstractStreamoperator>> (int &data)
 Remove a single integer from the XDR data stream.
virtual void pack (const int *data, const int n=1)
 Pack an array of integers into the XDR data stream.
virtual void unpack (int *data, const int n=1)
 Remove an array of integers from the XDR data stream.

Detailed Description

Class XDRStream provides pack/unpack operations that convert between machine representation and XDR representation for portable interprocessor communication. Note that unless XDR translation is required for portability across machine architectures, it would be faster to copy data directly.

The appropriate XDR stream must be set by setXDRStream() before any of the packing or unpacking calls are made. All of the packing and unpacking operations have been defined here for the XDR operations.

See also:
tbox::AbstractStream


Constructor & Destructor Documentation

SAMRAI::tbox::XDRStream::XDRStream (  )  [inline]

Standard default constructor for the XDR stream.

SAMRAI::tbox::XDRStream::~XDRStream (  )  [virtual]

Virtual destructor for the XDR stream.


Member Function Documentation

void SAMRAI::tbox::XDRStream::setXDRStream ( XDR xdrs  )  [inline]

Set the XDR stream to/from which data will be written/read. The XDR stream must be set before calling any packing/unpacking operation.

AbstractStream & SAMRAI::tbox::XDRStream::operator<< ( const bool &  data  )  [virtual]

Pack a single bool into the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

AbstractStream & SAMRAI::tbox::XDRStream::operator>> ( bool &  data  )  [virtual]

Remove a single bool from the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::pack ( const bool *  data,
const int  n = 1 
) [virtual]

Pack an array of bools into the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::unpack ( bool *  data,
const int  n = 1 
) [virtual]

Remove an array of bools from the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

AbstractStream & SAMRAI::tbox::XDRStream::operator<< ( const char &  data  )  [virtual]

Pack a single char into the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

AbstractStream & SAMRAI::tbox::XDRStream::operator>> ( char &  data  )  [virtual]

Remove a single char from the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::pack ( const char *  data,
const int  n = 1 
) [virtual]

Pack an array of chars into the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::unpack ( char *  data,
const int  n = 1 
) [virtual]

Remove an array of chars from the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::writeString ( const char *  data  )  [virtual]

Write a string into the XDR data stream.

AbstractStream & SAMRAI::tbox::XDRStream::operator<< ( const dcomplex data  )  [virtual]

Pack a single double complex into the message stream.

Implements SAMRAI::tbox::AbstractStream.

AbstractStream & SAMRAI::tbox::XDRStream::operator>> ( dcomplex data  )  [virtual]

Remove a single double complex from the message stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::pack ( const dcomplex data,
const int  n = 1 
) [virtual]

Pack an array of double complex into the message stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::unpack ( dcomplex data,
const int  n = 1 
) [virtual]

Remove an array of double complex from the message stream.

Implements SAMRAI::tbox::AbstractStream.

AbstractStream & SAMRAI::tbox::XDRStream::operator<< ( const double &  data  )  [virtual]

Pack a single double into the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

AbstractStream & SAMRAI::tbox::XDRStream::operator>> ( double &  data  )  [virtual]

Remove a single double from the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::pack ( const double *  data,
const int  n = 1 
) [virtual]

Pack an array of doubles into the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::unpack ( double *  data,
const int  n = 1 
) [virtual]

Remove an array of doubles from the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

AbstractStream & SAMRAI::tbox::XDRStream::operator<< ( const float &  data  )  [virtual]

Pack a single float into the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

AbstractStream & SAMRAI::tbox::XDRStream::operator>> ( float &  data  )  [virtual]

Remove a single float from the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::pack ( const float *  data,
const int  n = 1 
) [virtual]

Pack an array of floats into the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::unpack ( float *  data,
const int  n = 1 
) [virtual]

Remove an array of floats from the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

AbstractStream & SAMRAI::tbox::XDRStream::operator<< ( const int &  data  )  [virtual]

Pack a single integer into the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

AbstractStream & SAMRAI::tbox::XDRStream::operator>> ( int &  data  )  [virtual]

Remove a single integer from the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::pack ( const int *  data,
const int  n = 1 
) [virtual]

Pack an array of integers into the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.

void SAMRAI::tbox::XDRStream::unpack ( int *  data,
const int  n = 1 
) [virtual]

Remove an array of integers from the XDR data stream.

Implements SAMRAI::tbox::AbstractStream.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:29:08 2009 for SAMRAI by  doxygen 1.5.1