FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

prefixOSstream Class Reference

Version of OSstream which prints a prefix on each line. More...

#include <OpenFOAM/prefixOSstream.H>


Detailed Description

Version of OSstream which prints a prefix on each line.

This is useful for running in parallel as it allows the processor number to be automatically prepended to each message line.

Source files

Definition at line 52 of file prefixOSstream.H.

Inheritance diagram for prefixOSstream:
Collaboration diagram for prefixOSstream:

List of all members.

Public Member Functions

 prefixOSstream (ostream &os, const string &name, streamFormat format=ASCII, versionNumber version=currentVersion, compressionType compression=UNCOMPRESSED)
 Set stream status.
const string &  prefix () const
 Return the prefix of the stream.
string &  prefix ()
 Return non-const access to the prefix of the stream.
virtual Ostream &  write (const token &)
 Write next token to stream.
virtual Ostream &  write (const char)
 Write character.
virtual Ostream &  write (const char *)
 Write character string.
virtual Ostream &  write (const word &)
 Write word.
virtual Ostream &  write (const string &)
 Write string.
virtual Ostream &  writeQuoted (const std::string &, const bool quoted=true)
 Write std::string surrounded by quotes.
virtual Ostream &  write (const label)
 Write label.
virtual Ostream &  write (const floatScalar)
 Write floatScalar.
virtual Ostream &  write (const doubleScalar)
 Write doubleScalar.
virtual Ostream &  write (const char *, std::streamsize)
 Write binary block.
virtual void  indent ()
 Add indentation characters.
virtual void  print (Ostream &) const
 Print description of IOstream to Ostream.

Constructor & Destructor Documentation

prefixOSstream ( ostream &   os,
const string &   name,
streamFormat   format = ASCII,
versionNumber   version = currentVersion,
compressionType   compression = UNCOMPRESSED  
)

Set stream status.

Definition at line 45 of file prefixOSstream.C.


Member Function Documentation

const string& prefix (  ) const [inline]

Return the prefix of the stream.

Definition at line 87 of file prefixOSstream.H.

Referenced by indexedOctree< Type >::print(), and PstreamImpl::setParRun().

string& prefix (  ) [inline]

Return non-const access to the prefix of the stream.

Definition at line 93 of file prefixOSstream.H.

Foam::Ostream & write ( const token &    ) [virtual]

Write next token to stream.

Reimplemented from OSstream.

Definition at line 68 of file prefixOSstream.C.

Referenced by treeNode< Type >::distribute().

Foam::Ostream & write ( const char   c  ) [virtual]

Write character.

Reimplemented from OSstream.

Definition at line 74 of file prefixOSstream.C.

References token::NL, and OSstream::write().

Foam::Ostream & write ( const char *   str  ) [virtual]

Write character string.

Reimplemented from OSstream.

Definition at line 88 of file prefixOSstream.C.

References token::NL, and OSstream::write().

Foam::Ostream & write ( const word &   val  ) [virtual]

Write word.

Reimplemented from OSstream.

Definition at line 103 of file prefixOSstream.C.

References OSstream::write().

Foam::Ostream & write ( const string &   val  ) [virtual]

Write string.

Reimplemented from OSstream.

Definition at line 110 of file prefixOSstream.C.

References OSstream::write().

Foam::Ostream & writeQuoted ( const std::string &   val,
const bool   quoted = true  
) [virtual]

Write std::string surrounded by quotes.

Optional write without quotes.

Reimplemented from OSstream.

Definition at line 118 of file prefixOSstream.C.

References OSstream::writeQuoted().

Foam::Ostream & write ( const label   val  ) [virtual]

Write label.

Reimplemented from OSstream.

Definition at line 128 of file prefixOSstream.C.

References OSstream::write().

Foam::Ostream & write ( const floatScalar   val  ) [virtual]

Write floatScalar.

Reimplemented from OSstream.

Definition at line 135 of file prefixOSstream.C.

References OSstream::write().

Foam::Ostream & write ( const doubleScalar   val  ) [virtual]

Write doubleScalar.

Reimplemented from OSstream.

Definition at line 142 of file prefixOSstream.C.

References OSstream::write().

Foam::Ostream & write ( const char *   buf,
std::streamsize   count  
) [virtual]

Write binary block.

Reimplemented from OSstream.

Definition at line 150 of file prefixOSstream.C.

References OSstream::write().

void indent (  ) [virtual]

Add indentation characters.

Reimplemented from OSstream.

Definition at line 160 of file prefixOSstream.C.

References OSstream::indent().

void print ( Ostream &   os  ) const [virtual]

Print description of IOstream to Ostream.

Reimplemented from OSstream.

Definition at line 61 of file prefixOSstream.C.

References OSstream::print().


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