OpenFOAM logo
Open Source CFD Toolkit

Ostream Class Reference

Inheritance diagram for Ostream:

Inheritance graph
[legend]
Collaboration diagram for Ostream:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Ostream (streamFormat format=ASCII, versionNumber version=currentVersion, compressionType compression=UNCOMPRESSED)
 Set stream status.
virtual ~Ostream ()
virtual Ostreamwrite (const token &)=0
 Write next token to stream.
virtual Ostreamwrite (const char)=0
 Write character.
virtual Ostreamwrite (const char *)=0
 Write character string.
virtual Ostreamwrite (const word &)=0
 Write word.
virtual Ostreamwrite (const string &)=0
 Write string.
virtual Ostreamwrite (const label)=0
 Write label.
virtual Ostreamwrite (const floatScalar)=0
 Write floatScalar.
virtual Ostreamwrite (const doubleScalar)=0
 Write doubleScalar.
virtual Ostreamwrite (const char *, std::streamsize)=0
 Write binary block.
virtual void indent ()=0
 Add indentation characters.
unsigned short indentLevel () const
 Return indent level.
unsigned short & indentLevel ()
 Access to indent level.
void incrIndent ()
 Incrememt the indent level.
void decrIndent ()
 Decrememt the indent level.
OstreamwriteKeyword (const word &keyword)
 Write the keyword to the Ostream followed by.
virtual void flush ()=0
 Flush stream.
virtual void endl ()=0
 Add '
' and flush stream.
virtual int width () const =0
 Get width of output field.
virtual int width (const int w)=0
 Set width of output field (and return old width).
virtual int precision () const =0
 Get precision of output field.
virtual int precision (const int p)=0
 Set precision of output field (and return old precision).
Ostreamoperator() () const
 Return a non-const reference to const Ostream.

Protected Attributes

unsigned short indentLevel_
 Current indent level.

Static Protected Attributes

const unsigned short indentSize_ = 4
 Number of spaces per indent level.
const unsigned short entryIndentation_ = 16
 Indentation of the entry from the start of the keyword.

Constructor & Destructor Documentation

Ostream streamFormat  format = ASCII,
versionNumber  version = currentVersion,
compressionType  compression = UNCOMPRESSED
[inline]
 

Set stream status.

Definition at line 85 of file Ostream.H.

virtual ~Ostream  )  [inline, virtual]
 

Definition at line 98 of file Ostream.H.


Member Function Documentation

void decrIndent  ) 
 

Decrememt the indent level.

virtual void endl  )  [pure virtual]
 

Add '
' and flush stream.

Implemented in OPstream, and OSstream.

virtual void flush  )  [pure virtual]
 

Flush stream.

Implemented in OPstream, and OSstream.

void incrIndent  )  [inline]
 

Incrememt the indent level.

Definition at line 149 of file Ostream.H.

virtual void indent  )  [pure virtual]
 

Add indentation characters.

Implemented in OPstream, OSstream, and prefixOSstream.

unsigned short& indentLevel  )  [inline]
 

Access to indent level.

Definition at line 143 of file Ostream.H.

unsigned short indentLevel  )  const [inline]
 

Return indent level.

Definition at line 137 of file Ostream.H.

Ostream& operator()  )  const [inline]
 

Return a non-const reference to const Ostream.

Needed for write functions where the stream argument is temporary: e.g. thing thisThing(OFstream("thingFileName")());

Definition at line 192 of file Ostream.H.

virtual int precision const int  p  )  [pure virtual]
 

Set precision of output field (and return old precision).

Implemented in OSstream.

virtual int precision  )  const [pure virtual]
 

Get precision of output field.

Implemented in OPstream, and OSstream.

virtual int width const int  w  )  [pure virtual]
 

Set width of output field (and return old width).

Implemented in OSstream.

virtual int width  )  const [pure virtual]
 

Get width of output field.

Implemented in OPstream, and OSstream.

virtual Ostream& write const char *  ,
std::streamsize 
[pure virtual]
 

Write binary block.

Implemented in OPstream, OSstream, and prefixOSstream.

virtual Ostream& write const   doubleScalar  )  [pure virtual]
 

Write doubleScalar.

Implemented in OPstream, OPstream, OPstream, OPstream, OSstream, OSstream, OSstream, OSstream, prefixOSstream, prefixOSstream, prefixOSstream, and prefixOSstream.

virtual Ostream& write const   floatScalar  )  [pure virtual]
 

Write floatScalar.

Implemented in OPstream, OPstream, OPstream, OPstream, OSstream, OSstream, OSstream, OSstream, prefixOSstream, prefixOSstream, prefixOSstream, and prefixOSstream.

virtual Ostream& write const   label  )  [pure virtual]
 

Write label.

Implemented in OPstream, OPstream, OPstream, OPstream, OSstream, OSstream, OSstream, OSstream, prefixOSstream, prefixOSstream, prefixOSstream, and prefixOSstream.

virtual Ostream& write const string  )  [pure virtual]
 

Write string.

Implemented in OPstream, OSstream, and prefixOSstream.

virtual Ostream& write const word  )  [pure virtual]
 

Write word.

Implemented in OPstream, OSstream, and prefixOSstream.

virtual Ostream& write const char *   )  [pure virtual]
 

Write character string.

Implemented in OPstream, OSstream, and prefixOSstream.

virtual Ostream& write const   char  )  [pure virtual]
 

Write character.

Implemented in OPstream, OPstream, OPstream, OPstream, OSstream, OSstream, OSstream, OSstream, prefixOSstream, prefixOSstream, prefixOSstream, and prefixOSstream.

virtual Ostream& write const token  )  [pure virtual]
 

Write next token to stream.

Implemented in OPstream, OSstream, and prefixOSstream.

Ostream& writeKeyword const word keyword  ) 
 

Write the keyword to the Ostream followed by.

appropriate indentation


Member Data Documentation

const unsigned short entryIndentation_ = 16 [static, protected]
 

Indentation of the entry from the start of the keyword.

Definition at line 76 of file Ostream.H.

unsigned short indentLevel_ [protected]
 

Current indent level.

Definition at line 73 of file Ostream.H.

const unsigned short indentSize_ = 4 [static, protected]
 

Number of spaces per indent level.

Definition at line 70 of file Ostream.H.


The documentation for this class was generated from the following file:
For further information go to www.openfoam.org