OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

prefixOSstream Class Reference

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

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 stringprefix () const
 Return the prefix of the stream.
stringprefix ()
 Return non-const access to the prefix of the stream.
virtual Ostreamwrite (const token &)
 Write next token to stream.
virtual Ostreamwrite (const char)
 Write character.
virtual Ostreamwrite (const char *)
 Write character string.
virtual Ostreamwrite (const word &)
 Write word.
virtual Ostreamwrite (const string &)
 Write string.
virtual OstreamwriteQuoted (const std::string &, const bool quoted=true)
 Write std::string surrounded by quotes.
virtual Ostreamwrite (const label)
 Write label.
virtual Ostreamwrite (const floatScalar)
 Write floatScalar.
virtual Ostreamwrite (const doubleScalar)
 Write doubleScalar.
virtual Ostreamwrite (const char *, std::streamsize)
 Write binary block.
virtual void indent ()
 Add indentation characters.
virtual void print (Ostream &) const
 Print description of IOstream to Ostream.

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 47 of file prefixOSstream.H.


Constructor & Destructor Documentation

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

Set stream status.

Definition at line 37 of file prefixOSstream.C.


Member Function Documentation

const string& prefix (  )  const [inline]

Return the prefix of the stream.

Definition at line 82 of file prefixOSstream.H.

string& prefix (  )  [inline]

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

Definition at line 88 of file prefixOSstream.H.

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

Write next token to stream.

Reimplemented from OSstream.

Definition at line 60 of file prefixOSstream.C.

References prefixOSstream::print().

Referenced by prefixOSstream::indent(), prefixOSstream::write(), and prefixOSstream::writeQuoted().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Write character.

Reimplemented from OSstream.

Definition at line 66 of file prefixOSstream.C.

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

Write character string.

Reimplemented from OSstream.

Definition at line 80 of file prefixOSstream.C.

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

Write word.

Reimplemented from OSstream.

Definition at line 95 of file prefixOSstream.C.

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

Write string.

Reimplemented from OSstream.

Definition at line 102 of file prefixOSstream.C.

References prefixOSstream::write().

Here is the call graph for this function:

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 110 of file prefixOSstream.C.

References prefixOSstream::write().

Referenced by prefixOSstream::write().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Write label.

Reimplemented from OSstream.

Definition at line 120 of file prefixOSstream.C.

References prefixOSstream::writeQuoted().

Here is the call graph for this function:

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

Write floatScalar.

Reimplemented from OSstream.

Definition at line 127 of file prefixOSstream.C.

References prefixOSstream::write().

Here is the call graph for this function:

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

Write doubleScalar.

Reimplemented from OSstream.

Definition at line 134 of file prefixOSstream.C.

References prefixOSstream::write().

Here is the call graph for this function:

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

Write binary block.

Reimplemented from OSstream.

Definition at line 142 of file prefixOSstream.C.

References prefixOSstream::write().

Here is the call graph for this function:

void indent (  )  [virtual]

Add indentation characters.

Reimplemented from OSstream.

Definition at line 152 of file prefixOSstream.C.

References prefixOSstream::write().

Here is the call graph for this function:

void print ( Ostream os  )  const [virtual]

Print description of IOstream to Ostream.

Reimplemented from OSstream.

Definition at line 53 of file prefixOSstream.C.

Referenced by prefixOSstream::write().

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd