SAMRAI::tbox::AbstractStream Class Reference

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

Inheritance diagram for SAMRAI::tbox::AbstractStream:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 AbstractStream ()
virtual ~AbstractStream ()
Boolean Stream Primitives
Pack and unpack booleans into and out of the abstract stream.

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

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

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

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

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

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

Static Public Member Functions

Stream Space Calculation Primitives
Calculate the stream space needed for various data types.

static int sizeofBool (const int n=1)
 Calculate the stream space needed for n bools.
static int sizeofChar (const int n=1)
 Calculate the stream space needed for n chars.
static int sizeofDoubleComplex (const int n=1)
 Calculate the stream space needed for n double complex.
static int sizeofDouble (const int n=1)
 Calculate the stream space needed for n doubles.
static int sizeofFloat (const int n=1)
 Calculate the stream space needed for n floats.
static int sizeofInt (const int n=1)
 Calculate the stream space needed for n ints.

Detailed Description

Class AbstractStream is an abstract virtual base class that provides a stream abstraction for packing and unpacking data. Data sizes are defined to be compliant with the XDR specs (the data buffer is always four-byte aligned). This alignment may make buffers a bit larger than necessary, but allows for XDR translation.

The sizeofXXX() functions should be used to calculate the amount of buffer space needed to pack primitive data type XXX, where XXX is one of bool, char, double, float, or int.


Constructor & Destructor Documentation

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

Default constructor for an abstract stream.

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

Virtual destructor for an abstract stream.


Member Function Documentation

int SAMRAI::tbox::AbstractStream::sizeofBool ( const int  n = 1  )  [inline, static]

Calculate the stream space needed for n bools.

int SAMRAI::tbox::AbstractStream::sizeofChar ( const int  n = 1  )  [inline, static]

Calculate the stream space needed for n chars.

int SAMRAI::tbox::AbstractStream::sizeofDoubleComplex ( const int  n = 1  )  [inline, static]

Calculate the stream space needed for n double complex.

int SAMRAI::tbox::AbstractStream::sizeofDouble ( const int  n = 1  )  [inline, static]

Calculate the stream space needed for n doubles.

int SAMRAI::tbox::AbstractStream::sizeofFloat ( const int  n = 1  )  [inline, static]

Calculate the stream space needed for n floats.

int SAMRAI::tbox::AbstractStream::sizeofInt ( const int  n = 1  )  [inline, static]

Calculate the stream space needed for n ints.

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

Pack a single bool into the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Remove a single bool from the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Pack an array of bools into the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Remove an array of bools from the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Pack a single char into the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Remove a single char from the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Pack an array of chars into the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Remove an array of chars from the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Pack a single double complex into the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Remove a single double complex from the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Pack an array of double complex into the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Remove an array of double complex from the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Pack a single double into the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Remove a single double from the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Pack an array of doubles into the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Remove an array of doubles from the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Pack a single float into the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Remove a single float from the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Pack an array of floats into the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Remove an array of floats from the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Pack a single integer into the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Remove a single integer from the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Pack an array of integers into the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.

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

Remove an array of integers from the abstract stream.

Implemented in SAMRAI::tbox::MessageStream, and SAMRAI::tbox::XDRStream.


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