#include <ParallelBuffer.h>
Public Member Functions | |
ParallelBuffer () | |
Default constructor. More... | |
~ParallelBuffer () | |
Destructor. More... | |
void | outputString (const std::string &text) |
Write a text string to the output stream. More... | |
void | outputString (const std::string &text, int length) |
Write a text string of the specified length to the output file. More... | |
int | sync () |
Synchronize the parallel buffer (called from streambuf). More... | |
int | overflow (int ch) |
Write an overflow character into the parallel buffer (called from streambuf). More... | |
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.
CAROM::ParallelBuffer::ParallelBuffer | ( | ) |
Default constructor.
The object will require further initialization to set up the I/O streams and prefix string.
CAROM::ParallelBuffer::~ParallelBuffer | ( | ) |
Destructor.
Simply deallocates any internal data buffers. It does not modify the output streams.
|
inline |
Write a text string to the output stream.
Note that the string is not actually written until an end-of-line is detected.
[in] | text | The string to be written. |
void CAROM::ParallelBuffer::outputString | ( | const std::string & | text, |
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.
[in] | text | The string to be written. |
[in] | length | The length of the string. |
int CAROM::ParallelBuffer::overflow | ( | int | ch | ) |
Write an overflow character into the parallel buffer (called from streambuf).
[in] | ch | The character to write. |
int CAROM::ParallelBuffer::sync | ( | ) |
Synchronize the parallel buffer (called from streambuf).