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

OPstream Class Reference

Output inter-processor communications stream. More...

Inheritance diagram for OPstream:
Collaboration diagram for OPstream:

List of all members.


Public Member Functions

 OPstream (const commsTypes commsType, const int toProcNo, const label bufSize=0, streamFormat format=BINARY, versionNumber version=currentVersion)
 Construct given process index to send to and optional buffer size,.
 ~OPstream ()
ios_base::fmtflags flags () const
 Return flags of output stream.
Ostreamwrite (const token &)
 Write next token to stream.
Ostreamwrite (const char)
 Write character.
Ostreamwrite (const char *)
 Write character string.
Ostreamwrite (const word &)
 Write word.
Ostreamwrite (const string &)
 Write string.
OstreamwriteQuoted (const std::string &, const bool quoted=true)
 Write std::string surrounded by quotes.
Ostreamwrite (const label)
 Write label.
Ostreamwrite (const floatScalar)
 Write floatScalar.
Ostreamwrite (const doubleScalar)
 Write doubleScalar.
Ostreamwrite (const char *, std::streamsize)
 Write binary block.
void indent ()
 Add indentation characters.
void flush ()
 Flush stream.
void endl ()
 Add newline and flush stream.
int width () const
 Get width of output field.
int width (const int)
 Set width of output field (and return old width).
int precision () const
 Get precision of output field.
int precision (const int)
 Set precision of output field (and return old precision).
ios_base::fmtflags flags (const ios_base::fmtflags)
 Set flags of stream.
void print (Ostream &) const
 Print description of IOstream to Ostream.

Static Public Member Functions

static bool write (const commsTypes commsType, const int toProcNo, const char *buf, const std::streamsize bufSize)
 Write given buffer to given processor.
static void waitRequests ()
 Non-blocking writes: wait until all have finished.
static bool finishedRequest (const label i)
 Non-blocking writes: has request i finished?

Detailed Description

Output inter-processor communications stream.

Source files

Definition at line 46 of file OPstream.H.


Constructor & Destructor Documentation

OPstream ( const commsTypes  commsType,
const int  toProcNo,
const label  bufSize = 0,
streamFormat  format = BINARY,
versionNumber  version = currentVersion 
)

Construct given process index to send to and optional buffer size,.

write format and IO version

Definition at line 84 of file OPstream.C.

fileScope ~OPstream (  ) 

Definition at line 29 of file OPwrite.C.


Member Function Documentation

ios_base::fmtflags flags (  )  const [inline, virtual]

Return flags of output stream.

Implements IOstream.

Definition at line 97 of file OPstream.H.

bool write ( const commsTypes  commsType,
const int  toProcNo,
const char *  buf,
const std::streamsize  bufSize 
) [static]

void waitRequests (  )  [static]

Non-blocking writes: wait until all have finished.

Definition at line 60 of file OPwrite.C.

Referenced by mapDistribute::distribute().

Here is the caller graph for this function:

bool finishedRequest ( const label  i  )  [static]

Non-blocking writes: has request i finished?

Definition at line 64 of file OPwrite.C.

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

Write next token to stream.

Implements Ostream.

Definition at line 108 of file OPstream.C.

References Pstream::buf_, and List< T >::setSize().

Here is the call graph for this function:

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

Write character.

Implements Ostream.

Definition at line 116 of file OPstream.C.

References notImplemented, and IOstream::setBad().

Here is the call graph for this function:

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

Write character string.

Implements Ostream.

Definition at line 127 of file OPstream.C.

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

Write word.

Implements Ostream.

Definition at line 146 of file OPstream.C.

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

Write string.

Implements Ostream.

Definition at line 158 of file OPstream.C.

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

Write std::string surrounded by quotes.

Optional write without quotes.

Implements Ostream.

Definition at line 170 of file OPstream.C.

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

Write label.

Implements Ostream.

Definition at line 182 of file OPstream.C.

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

Write floatScalar.

Implements Ostream.

Definition at line 190 of file OPstream.C.

References token::LABEL, and OPstream::write().

Here is the call graph for this function:

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

Write doubleScalar.

Implements Ostream.

Definition at line 198 of file OPstream.C.

References token::FLOAT_SCALAR, and OPstream::write().

Here is the call graph for this function:

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

Write binary block.

Implements Ostream.

Definition at line 206 of file OPstream.C.

References token::DOUBLE_SCALAR, and OPstream::write().

Here is the call graph for this function:

void indent (  )  [inline, virtual]

Add indentation characters.

Implements Ostream.

Definition at line 158 of file OPstream.H.

void flush (  )  [inline, virtual]

Flush stream.

Implements Ostream.

Definition at line 165 of file OPstream.H.

void endl (  )  [inline, virtual]

Add newline and flush stream.

Implements Ostream.

Definition at line 169 of file OPstream.H.

int width (  )  const [inline, virtual]

Get width of output field.

Implements Ostream.

Definition at line 173 of file OPstream.H.

int width ( const   int  )  [inline, virtual]

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

Implements Ostream.

Definition at line 179 of file OPstream.H.

int precision (  )  const [inline, virtual]

Get precision of output field.

Implements Ostream.

Definition at line 185 of file OPstream.H.

int precision ( const   int  )  [inline, virtual]

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

Implements Ostream.

Definition at line 191 of file OPstream.H.

ios_base::fmtflags flags ( const ios_base::fmtflags   )  [inline]

Set flags of stream.

Definition at line 200 of file OPstream.H.

void print ( Ostream os  )  const [virtual]

Print description of IOstream to Ostream.

Reimplemented from IOstream.

Definition at line 34 of file PstreamsPrint.C.

References Foam::endl(), and Pstream::myProcNo().

Here is the call graph for this function:


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