libROM  v1.0
Data-driven physical simulation library
Public Member Functions | List of all members
CAROM::ParallelBuffer Class Reference

#include <ParallelBuffer.h>

Inheritance diagram for CAROM::ParallelBuffer:

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...
 

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.

Definition at line 30 of file ParallelBuffer.h.

Constructor & Destructor Documentation

◆ ParallelBuffer()

CAROM::ParallelBuffer::ParallelBuffer ( )

Default constructor.

The object will require further initialization to set up the I/O streams and prefix string.

Definition at line 36 of file ParallelBuffer.cpp.

◆ ~ParallelBuffer()

CAROM::ParallelBuffer::~ParallelBuffer ( )

Destructor.

Simply deallocates any internal data buffers. It does not modify the output streams.

Definition at line 62 of file ParallelBuffer.cpp.

Member Function Documentation

◆ outputString() [1/2]

void CAROM::ParallelBuffer::outputString ( const std::string &  text)
inline

Write a text string to the output stream.

Note that the string is not actually written until an end-of-line is detected.

Parameters
[in]textThe string to be written.

Definition at line 58 of file ParallelBuffer.h.

◆ outputString() [2/2]

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.

Parameters
[in]textThe string to be written.
[in]lengthThe length of the string.

Definition at line 79 of file ParallelBuffer.cpp.

◆ overflow()

int CAROM::ParallelBuffer::overflow ( int  ch)

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

Parameters
[in]chThe character to write.
Returns
0

Definition at line 178 of file ParallelBuffer.cpp.

◆ sync()

int CAROM::ParallelBuffer::sync ( )

Synchronize the parallel buffer (called from streambuf).

Returns
0

Definition at line 136 of file ParallelBuffer.cpp.


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