Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SAMRAI::tbox::ParallelBuffer Class Reference

#include <source/toolbox/base/ParallelBuffer.h>

List of all members.

Public Member Functions

 ParallelBuffer ()
virtual ~ParallelBuffer ()
void setActive (bool active)
void setPrefixString (const string &text)
void setOutputStream1 (ostream *stream)
void setOutputStream2 (ostream *stream)
void outputString (const string &text)
void outputString (const string &text, const int length)
virtual int sync ()
virtual int overflow (int ch)


Detailed Description

Class ParallelBuffer is a simple I/O stream utility that intercepts output from an ostream and redirects the output as necessary for parallel I/O. This class defines a stream buffer class for an ostream class.


Constructor & Destructor Documentation

SAMRAI::tbox::ParallelBuffer::ParallelBuffer  ) 
 

Create a parallel buffer class. The object will require further initialization to set up the I/O streams and prefix string.

SAMRAI::tbox::ParallelBuffer::~ParallelBuffer  )  [virtual]
 

The destructor simply deallocates any internal data buffers. It does not modify the output streams.


Member Function Documentation

void SAMRAI::tbox::ParallelBuffer::setActive bool  active  ) 
 

Set whether the output stream will be active. If the parallel buffer stream is disabled, then no data is forwarded to the output streams. The internal data buffer is deallocated and pointers are reset whenever the parallel buffer is deactivated.

void SAMRAI::tbox::ParallelBuffer::setPrefixString const string &  text  ) 
 

Set the prefix that begins every new line to the output stream. A sample prefix is "P=XXXXX: ", where XXXXX represents the node number.

void SAMRAI::tbox::ParallelBuffer::setOutputStream1 ostream *  stream  ) 
 

Set the primary output stream. If not NULL, then output data is sent to this stream. The primary output stream is typically stderr or stdout or perhaps a log file.

void SAMRAI::tbox::ParallelBuffer::setOutputStream2 ostream *  stream  ) 
 

Set the secondary output stream. If not NULL, then output data is sent to this stream. The secondary output stream is typically NULL or a log file that mirrors the primary output stream.

void SAMRAI::tbox::ParallelBuffer::outputString const string &  text  ) 
 

Write a text string to the output stream. Note that the string is not actually written until an end-of-line is detected.

void SAMRAI::tbox::ParallelBuffer::outputString const string &  text,
const int  length
 

Write a text string of the specified length to the output file. Note that the string is not actually written until an end-of-line is detected.

int SAMRAI::tbox::ParallelBuffer::sync  )  [virtual]
 

Synchronize the parallel buffer (called from streambuf).

int SAMRAI::tbox::ParallelBuffer::overflow int  ch  )  [virtual]
 

Write an overflow character into the parallel buffer (called from streambuf).


The documentation for this class was generated from the following files:
Generated on Fri Dec 2 11:33:18 2005 for SAMRAI by  doxygen 1.4.2