Ostream Class Referenceabstract

An Ostream is an abstract base class for all output systems (streams, files, token lists, etc). More...

Inheritance diagram for Ostream:
[legend]
Collaboration diagram for Ostream:
[legend]

Public Member Functions

 Ostream (streamFormat format=ASCII, versionNumber version=currentVersion, compressionType compression=UNCOMPRESSED)
 Construct and set stream status. More...
 
virtual ~Ostream ()=default
 Destructor. More...
 
virtual bool write (const token &tok)=0
 Write token to stream or otherwise handle it. More...
 
virtual Ostreamwrite (const char c)=0
 Write character. More...
 
virtual Ostreamwrite (const char *str)=0
 Write character string. More...
 
virtual Ostreamwrite (const word &str)=0
 Write word. More...
 
virtual Ostreamwrite (const keyType &kw)
 Write keyType. More...
 
virtual Ostreamwrite (const string &str)=0
 Write string. More...
 
virtual OstreamwriteQuoted (const std::string &str, const bool quoted=true)=0
 Write std::string surrounded by quotes. More...
 
virtual Ostreamwrite (const int32_t val)=0
 Write int32_t. More...
 
virtual Ostreamwrite (const int64_t val)=0
 Write int64_t. More...
 
virtual Ostreamwrite (const floatScalar val)=0
 Write floatScalar. More...
 
virtual Ostreamwrite (const doubleScalar val)=0
 Write doubleScalar. More...
 
virtual Ostreamwrite (const char *data, std::streamsize count)=0
 Write binary block. More...
 
virtual OstreambeginRaw (std::streamsize count)=0
 Emit begin marker for low-level raw binary output. More...
 
virtual OstreamwriteRaw (const char *data, std::streamsize count)=0
 Low-level raw binary output. More...
 
virtual OstreamendRaw ()=0
 Emit end marker for low-level raw binary output. More...
 
virtual void indent ()=0
 Add indentation characters. More...
 
unsigned short indentLevel () const
 Return indent level. More...
 
unsigned short & indentLevel ()
 Access to indent level. More...
 
void incrIndent ()
 Increment the indent level. More...
 
void decrIndent ()
 Decrement the indent level. More...
 
virtual OstreamwriteKeyword (const keyType &kw)
 Write the keyword followed by an appropriate indentation. More...
 
virtual OstreambeginBlock (const keyType &kw)
 Write begin block group with the given name. More...
 
virtual OstreambeginBlock ()
 Write begin block group without a name. More...
 
virtual OstreamendBlock ()
 Write end block group. More...
 
virtual OstreamendEntry ()
 Write end entry (';') followed by newline. More...
 
template<class T >
OstreamwriteEntry (const keyType &key, const T &value)
 Write a keyword/value entry. More...
 
template<class T >
OstreamwriteEntryIfDifferent (const word &key, const T &value1, const T &value2)
 Write a keyword/value entry only when the two values differ. More...
 
virtual void flush ()=0
 Flush stream. More...
 
virtual void endl ()=0
 Add newline and flush stream. More...
 
virtual char fill () const =0
 Get padding character. More...
 
virtual char fill (const char fillch)=0
 Set padding character for formatted field up to field width. More...
 
virtual int width () const =0
 Get width of output field. More...
 
virtual int width (const int w)=0
 Set width of output field (and return old width) More...
 
virtual int precision () const =0
 Get precision of output field. More...
 
virtual int precision (const int p)=0
 Set precision of output field (and return old precision) More...
 
Ostreamoperator() () const
 Return a non-const reference to const Ostream. More...
 
- Public Member Functions inherited from IOstream
 IOstream (const IOstreamOption option)
 Construct with specified stream option. More...
 
 IOstream (streamFormat format, versionNumber version, compressionType compression=UNCOMPRESSED)
 Construct setting format and version. More...
 
virtual ~IOstream ()=default
 Destructor. More...
 
virtual const fileNamename () const
 Return the name of the stream. More...
 
virtual fileNamename ()
 Return non-const access to the name of the stream. More...
 
virtual bool check (const char *operation) const
 Check IOstream status for given operation. More...
 
void fatalCheck (const char *operation) const
 Check IOstream status for given operation. More...
 
bool opened () const
 Return true if stream has been opened. More...
 
bool closed () const
 Return true if stream is closed. More...
 
bool good () const
 Return true if next operation might succeed. More...
 
bool eof () const
 Return true if end of input seen. More...
 
bool fail () const
 Return true if next operation will fail. More...
 
bool bad () const
 Return true if stream is corrupted. More...
 
 operator bool () const
 Return true if the stream has not failed. More...
 
bool operator! () const
 Return true if the stream has failed. More...
 
label lineNumber () const
 Const access to the current stream line number. More...
 
labellineNumber ()
 Non-const access to the current stream line number. More...
 
label lineNumber (const label num)
 Set the stream line number. More...
 
virtual ios_base::fmtflags flags () const =0
 Return flags of stream. More...
 
void setEof ()
 Set stream to have reached eof. More...
 
void setFail ()
 Set stream to have failed. More...
 
void setBad ()
 Set stream to be bad. More...
 
virtual ios_base::fmtflags flags (const ios_base::fmtflags f)=0
 Set flags of stream. More...
 
ios_base::fmtflags setf (const ios_base::fmtflags f)
 Set flags of stream. More...
 
ios_base::fmtflags setf (const ios_base::fmtflags f, const ios_base::fmtflags mask)
 Set flags of given field of stream. More...
 
void unsetf (const ios_base::fmtflags f)
 Unset flags of stream. More...
 
virtual void print (Ostream &os) const
 Print description of IOstream to Ostream. More...
 
void print (Ostream &os, const int streamState) const
 Print information about the stream state bits. More...
 
InfoProxy< IOstreaminfo () const
 Return info proxy. More...
 
- Public Member Functions inherited from IOstreamOption
 IOstreamOption () noexcept
 Construct null. (default: ASCII, uncompressed, currentVersion) More...
 
 IOstreamOption (streamFormat format) noexcept
 Construct with format. (default: uncompressed, currentVersion) More...
 
 IOstreamOption (streamFormat format, compressionType compression, versionNumber version=currentVersion) noexcept
 Construct with format and compression, optionally with version. More...
 
 IOstreamOption (streamFormat format, versionNumber version, compressionType compression) noexcept
 Construct with format, version, compression. More...
 
streamFormat format () const noexcept
 Get the current stream format. More...
 
streamFormat format (const streamFormat format) noexcept
 Set the stream format. More...
 
streamFormat format (const word &formatName)
 Set the stream format, from string value. More...
 
compressionType compression () const noexcept
 Get the stream compression. More...
 
compressionType compression (const compressionType comp) noexcept
 Set the stream compression. More...
 
compressionType compression (const word &compressionName)
 Set the stream compression, from string value. More...
 
versionNumber version () const noexcept
 Get the stream version. More...
 
versionNumber version (const versionNumber verNum) noexcept
 Set the stream version. More...
 

Protected Attributes

unsigned short indentLevel_
 Current indent level. More...
 
- Protected Attributes inherited from IOstream
streamAccess openClosed_
 
ios_base::iostate ioState_
 
label lineNumber_
 

Static Protected Attributes

static const unsigned short indentSize_ = 4
 Number of spaces per indent level. More...
 
static const unsigned short entryIndentation_ = 16
 Indentation of the entry from the start of the keyword. More...
 
- Static Protected Attributes inherited from IOstream
static fileName staticName_
 Name for any generic stream - normally treat as readonly. More...
 

Additional Inherited Members

- Public Types inherited from IOstream
enum  streamAccess : char { CLOSED = 0, OPENED }
 Enumeration for whether the stream open or closed. More...
 
- Public Types inherited from IOstreamOption
enum  streamFormat : char { ASCII, BINARY }
 Data format (ascii | binary) More...
 
enum  compressionType : char { UNCOMPRESSED = 0, COMPRESSED }
 Compression treatment (UNCOMPRESSED | COMPRESSED) More...
 
- Static Public Member Functions inherited from IOstream
static unsigned int defaultPrecision ()
 Return the default precision. More...
 
static unsigned int defaultPrecision (unsigned int prec)
 Reset the default precision. More...
 
- Static Public Member Functions inherited from IOstreamOption
static streamFormat formatEnum (const word &formatName)
 The stream format enum corresponding to the string. More...
 
static compressionType compressionEnum (const word &compName)
 The compression enum corresponding to the string. More...
 
- Static Public Attributes inherited from IOstream
static unsigned int precision_
 Default precision. More...
 
- Static Public Attributes inherited from IOstreamOption
static const Enum< streamFormatformatNames
 Stream format names (ascii, binary) More...
 
static const versionNumber originalVersion
 The original version number. More...
 
static const versionNumber currentVersion
 The current version number. More...
 
- Protected Member Functions inherited from IOstream
void setOpened ()
 Set stream opened. More...
 
void setClosed ()
 Set stream closed. More...
 
void setState (ios_base::iostate state)
 Set stream state. More...
 
void setGood ()
 Set stream to be good. More...
 

Detailed Description

An Ostream is an abstract base class for all output systems (streams, files, token lists, etc).

Source files

Definition at line 55 of file Ostream.H.

Constructor & Destructor Documentation

◆ Ostream()

Ostream ( streamFormat  format = ASCII,
versionNumber  version = currentVersion,
compressionType  compression = UNCOMPRESSED 
)
inline

Construct and set stream status.

Definition at line 80 of file Ostream.H.

◆ ~Ostream()

virtual ~Ostream ( )
virtualdefault

Destructor.

Member Function Documentation

◆ write() [1/11]

virtual bool write ( const token tok)
pure virtual

Write token to stream or otherwise handle it.

Returns
false if the token type was not handled by this method

Implemented in UOPstream, OSstream, and prefixOSstream.

Referenced by snappyLayerDriver::addLayers(), interRegionHeatTransferModel::addSup(), nearWallFields::calcAddressing(), hexRef8::consistentSlowRefinement2(), distanceSurface::createGeometry(), snappySnapDriver::doSnap(), if(), isoSurface::isoSurface(), isoSurfaceCell::isoSurfaceCell(), meshRefinement::mergeEdgesUndo(), meshRefinement::mergePatchFacesUndo(), Foam::operator<<(), pointNoise::processData(), refinementIterator::setRefinement(), hexRef8::setRefinement(), snappySnapDriver::smoothDisplacement(), adjointSimple::solveIter(), trackingInverseDistance::update(), FallOffReactionRate< ReactionRate, FallOffFunction >::write(), SHA1Digest::write(), tabulatedAxialAngularSpring::write(), writeCellCentres::write(), XiReactionRate::write(), interpolationTable< scalar >::write(), SHA1::write(), functionEntry::write(), ensightFile::write(), NonEquilibriumReversibleReaction< ReactionType, ReactionThermo, ReactionRate >::write(), derivedFields::write(), primitiveEntry::write(), freestreamFvPatchField< Type >::write(), fixedNormalInletOutletVelocityFvPatchVectorField::write(), sixDoFRigidBodyMotion::write(), extractEulerianParticles::write(), rigidBodyModel::write(), cyclicPolyPatch::write(), cyclicAMIPolyPatch::write(), mappedPatchBase::write(), coordinateSystem::write(), particle< Type >::writeCoordinates(), UniformDimensionedField< vector >::writeData(), profiling::writeData(), FixedList< Type, 3 >::writeList(), PackedList< 2 >::writeList(), UList< Foam::wordRe >::writeList(), bitSet::writeList(), Matrix< RectangularMatrix< Type >, Type >::writeMatrix(), injectedParticle::writePosition(), particle< Type >::writePosition(), OSstream::writeRaw(), and streamLineBase::writeToFile().

◆ write() [2/11]

virtual Ostream& write ( const char  c)
pure virtual

Write character.

Implemented in UOPstream, OSstream, OBJstream, and prefixOSstream.

◆ write() [3/11]

virtual Ostream& write ( const char *  str)
pure virtual

Write character string.

Implemented in UOPstream, OSstream, OBJstream, prefixOSstream, and ensightFile.

◆ write() [4/11]

virtual Ostream& write ( const word str)
pure virtual

Write word.

Implemented in prefixOSstream, UOPstream, OSstream, and OBJstream.

◆ write() [5/11]

Foam::Ostream & write ( const keyType kw)
virtual

Write keyType.

A plain word is written unquoted. A regular expression is written as a quoted string.

Definition at line 51 of file Ostream.C.

References keyType::isPattern().

Here is the call graph for this function:

◆ write() [6/11]

virtual Ostream& write ( const string str)
pure virtual

Write string.

Implemented in prefixOSstream, OSHA1stream, UOPstream, OSstream, OBJstream, and ensightFile.

◆ writeQuoted()

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

Write std::string surrounded by quotes.

Optional write without quotes.

Implemented in prefixOSstream, UOPstream, OSstream, and OBJstream.

Referenced by Foam::operator<<(), dynamicCode::writeCommentSHA1(), and decomposedBlockData::writeData().

Here is the caller graph for this function:

◆ write() [7/11]

virtual Ostream& write ( const int32_t  val)
pure virtual

Write int32_t.

Implemented in UOPstream, OSstream, and prefixOSstream.

◆ write() [8/11]

virtual Ostream& write ( const int64_t  val)
pure virtual

Write int64_t.

Implemented in UOPstream, OSstream, and prefixOSstream.

◆ write() [9/11]

virtual Ostream& write ( const floatScalar  val)
pure virtual

Write floatScalar.

Implemented in UOPstream, OSstream, and prefixOSstream.

◆ write() [10/11]

virtual Ostream& write ( const doubleScalar  val)
pure virtual

Write doubleScalar.

Implemented in UOPstream, OSstream, and prefixOSstream.

◆ write() [11/11]

virtual Ostream& write ( const char *  data,
std::streamsize  count 
)
pure virtual

Write binary block.

Implemented in UOPstream, OSstream, ensightFile, and prefixOSstream.

◆ beginRaw()

virtual Ostream& beginRaw ( std::streamsize  count)
pure virtual

Emit begin marker for low-level raw binary output.

The count should indicate the number of bytes for subsequent writeRaw calls.

Implemented in UOPstream, and OSstream.

Referenced by IndirectListBase< T, sliceRange >::writeList().

Here is the caller graph for this function:

◆ writeRaw()

virtual Ostream& writeRaw ( const char *  data,
std::streamsize  count 
)
pure virtual

Low-level raw binary output.

Implemented in UOPstream, and OSstream.

Referenced by IndirectListBase< T, sliceRange >::writeList().

Here is the caller graph for this function:

◆ endRaw()

virtual Ostream& endRaw ( )
pure virtual

Emit end marker for low-level raw binary output.

Implemented in UOPstream, and OSstream.

Referenced by IndirectListBase< T, sliceRange >::writeList().

Here is the caller graph for this function:

◆ indent()

virtual void indent ( )
pure virtual

Add indentation characters.

Implemented in UOPstream, OSstream, and prefixOSstream.

Referenced by vtmWriter::dump(), and Foam::indent().

Here is the caller graph for this function:

◆ indentLevel() [1/2]

unsigned short indentLevel ( ) const
inline

Return indent level.

Definition at line 162 of file Ostream.H.

References Ostream::indentLevel_.

◆ indentLevel() [2/2]

unsigned short& indentLevel ( )
inline

Access to indent level.

Definition at line 168 of file Ostream.H.

References Ostream::indentLevel_.

◆ incrIndent()

void incrIndent ( )
inline

Increment the indent level.

Definition at line 174 of file Ostream.H.

References Ostream::indentLevel_.

Referenced by Foam::incrIndent().

Here is the caller graph for this function:

◆ decrIndent()

void decrIndent ( )

Decrement the indent level.

Definition at line 36 of file Ostream.C.

References Foam::endl(), and Ostream::indentLevel_.

Referenced by Foam::decrIndent(), and vtmWriter::dump().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeKeyword()

Foam::Ostream & writeKeyword ( const keyType kw)
virtual

◆ beginBlock() [1/2]

Foam::Ostream & beginBlock ( const keyType kw)
virtual

Write begin block group with the given name.

Increments indentation, adds newline.

Definition at line 85 of file Ostream.C.

References Foam::beginBlock(), Foam::indent(), keyType::isPattern(), and Foam::vtk::write().

Referenced by vtmWriter::dump(), ensightPartCells::dumpInfo(), ensightPartFaces::dumpInfo(), Foam::operator<<(), Foam::RBD::operator<<(), Foam::functionObjects::operator<<(), FallOffReactionRate< ReactionRate, FallOffFunction >::write(), ReactionList< Foam::sutherlandTransport >::write(), profilingInformation::write(), specie::write(), rhoConst< Specie >::write(), sutherlandTransport< Thermo >::write(), hConstThermo< EquationOfState >::write(), hRefConstThermo< EquationOfState >::write(), eConstThermo< EquationOfState >::write(), perfectFluid< Specie >::write(), NonEquilibriumReversibleReaction< ReactionType, ReactionThermo, ReactionRate >::write(), incompressiblePerfectGas< Specie >::write(), linear< Type >::write(), polynomialSolidTransport< Thermo, PolySize >::write(), adiabaticPerfectFluid< Specie >::write(), Boussinesq< Specie >::write(), polynomialTransport< Thermo, PolySize >::write(), janafThermo< EquationOfState >::write(), logPolynomialTransport< Thermo, PolySize >::write(), icoPolynomial< Specie, PolySize >::write(), freestreamFvPatchField< Type >::write(), hPolynomialThermo< EquationOfState, PolySize >::write(), fixedNormalInletOutletVelocityFvPatchVectorField::write(), sixDoFRigidBodyMotion::write(), rigidBodyModel::write(), dictionary::write(), TableFile< Type >::writeData(), CSV< Type >::writeData(), ramp::writeData(), Scale< Type >::writeData(), faBoundaryMesh::writeData(), Sine< Type >::writeData(), Square< Type >::writeData(), profiling::writeData(), polyBoundaryMesh::writeData(), MRFZone::writeData(), setUpdater::writeDict(), perfectInterface::writeDict(), surfZone::writeDict(), colourTable::writeDict(), attachDetach::writeDict(), plane::writeDict(), slidingInterface::writeDict(), GeometricField< Type, PatchField, GeoMesh >::Boundary::writeEntries(), identity::writeEntry(), cylindrical::writeEntry(), starcd::writeEntry(), axisAngle::writeEntry(), euler::writeEntry(), axes::writeEntry(), GeometricField< Type, PatchField, GeoMesh >::Boundary::writeEntry(), indirect::writeEntry(), coordinateSystem::writeEntry(), dictionary::writeEntry(), option::writeHeader(), ensightPartCells::writeSummary(), and ensightPartFaces::writeSummary().

Here is the call graph for this function:

◆ beginBlock() [2/2]

Foam::Ostream & beginBlock ( )
virtual

Write begin block group without a name.

Increments indentation, adds newline.

Definition at line 94 of file Ostream.C.

References token::BEGIN_BLOCK, Foam::incrIndent(), Foam::indent(), and Foam::vtk::write().

Here is the call graph for this function:

◆ endBlock()

Foam::Ostream & endBlock ( )
virtual

Write end block group.

Decrements indentation, adds newline.

Definition at line 103 of file Ostream.C.

References Foam::decrIndent(), token::END_BLOCK, Foam::indent(), and Foam::vtk::write().

Referenced by vtmWriter::dump(), ensightPartCells::dumpInfo(), ensightPartFaces::dumpInfo(), Foam::operator<<(), Foam::RBD::operator<<(), Foam::functionObjects::operator<<(), ReactionList< Foam::sutherlandTransport >::write(), FallOffReactionRate< ReactionRate, FallOffFunction >::write(), profilingInformation::write(), specie::write(), rhoConst< Specie >::write(), sutherlandTransport< Thermo >::write(), hConstThermo< EquationOfState >::write(), hRefConstThermo< EquationOfState >::write(), eConstThermo< EquationOfState >::write(), perfectFluid< Specie >::write(), NonEquilibriumReversibleReaction< ReactionType, ReactionThermo, ReactionRate >::write(), incompressiblePerfectGas< Specie >::write(), linear< Type >::write(), polynomialSolidTransport< Thermo, PolySize >::write(), adiabaticPerfectFluid< Specie >::write(), Boussinesq< Specie >::write(), polynomialTransport< Thermo, PolySize >::write(), janafThermo< EquationOfState >::write(), logPolynomialTransport< Thermo, PolySize >::write(), icoPolynomial< Specie, PolySize >::write(), freestreamFvPatchField< Type >::write(), hPolynomialThermo< EquationOfState, PolySize >::write(), fixedNormalInletOutletVelocityFvPatchVectorField::write(), sixDoFRigidBodyMotion::write(), rigidBodyModel::write(), dictionary::write(), TableFile< Type >::writeData(), CSV< Type >::writeData(), ramp::writeData(), Scale< Type >::writeData(), faBoundaryMesh::writeData(), Sine< Type >::writeData(), Square< Type >::writeData(), profiling::writeData(), polyBoundaryMesh::writeData(), MRFZone::writeData(), setUpdater::writeDict(), perfectInterface::writeDict(), surfZone::writeDict(), colourTable::writeDict(), attachDetach::writeDict(), plane::writeDict(), slidingInterface::writeDict(), GeometricField< Type, PatchField, GeoMesh >::Boundary::writeEntries(), identity::writeEntry(), cylindrical::writeEntry(), starcd::writeEntry(), axisAngle::writeEntry(), euler::writeEntry(), axes::writeEntry(), GeometricField< Type, PatchField, GeoMesh >::Boundary::writeEntry(), indirect::writeEntry(), coordinateSystem::writeEntry(), dictionary::writeEntry(), option::writeFooter(), ensightPartCells::writeSummary(), and ensightPartFaces::writeSummary().

Here is the call graph for this function:

◆ endEntry()

Foam::Ostream & endEntry ( )
virtual

Write end entry (';') followed by newline.

Definition at line 112 of file Ostream.C.

References token::END_STATEMENT, and Foam::vtk::write().

Referenced by Foam::endEntry(), TableFile< Type >::writeData(), CSV< Type >::writeData(), Sine< Type >::writeData(), Square< Type >::writeData(), and Ostream::writeEntry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeEntry()

Ostream& writeEntry ( const keyType key,
const T value 
)
inline

Write a keyword/value entry.

The following two are functionally equivalent:

os.writeEntry(key, value);
os.writeKeyword(key) << value << endEntry;

Definition at line 208 of file Ostream.H.

References Ostream::endEntry(), and Ostream::writeKeyword().

Referenced by ensightPartCells::dumpInfo(), ensightPartFaces::dumpInfo(), Foam::operator<<(), Foam::functionObjects::operator<<(), codedFixedValueFvPatchField< Type >::redirectPatchField(), codedFixedValuePointPatchField< Type >::redirectPatchField(), profilingSysInfo::write(), thirdBodyEfficiencies::write(), masslessBody::write(), SRIFallOffFunction::write(), TroeFallOffFunction::write(), cpuInfo::write(), cosine::write(), linear::write(), KocamustafaogullariIshii::write(), Pa::write(), Ra::write(), ArrheniusReactionRate::write(), TolubinskiKostanchuk::write(), axis::write(), LandauTellerReactionRate::write(), powerSeriesReactionRate::write(), partitioningModel::write(), sphere::write(), solidArrheniusReactionRate::write(), cuboid::write(), subBody::write(), linearDamper::write(), ReactionList< Foam::sutherlandTransport >::write(), sphericalAngularDamper::write(), point::write(), departureFrequencyModel::write(), csvTableReader< Type >::write(), departureDiameterModel::write(), nucleationSiteModel::write(), plane::write(), line::write(), sphericalAngularSpring::write(), coupleGroupIdentifier::write(), profilingInformation::write(), linearAxialAngularSpring::write(), CloudSubModelBase< CloudType >::write(), copiedFixedValueFvPatchScalarField::write(), DispersionRASModel< CloudType >::write(), linearSpring::write(), adjointOutletNuaTildaFvPatchScalarField::write(), adjointWallVelocityLowReFvPatchVectorField::write(), tabulatedAxialAngularSpring::write(), specie::write(), boundaryPatch::write(), adjointOutletPressureFvPatchScalarField::write(), memInfo::write(), fixedMultiPhaseHeatFluxFvPatchScalarField::write(), interpolation2DTable< scalar >::write(), timeVaryingAlphaContactAngleFvPatchScalarField::write(), oscillatingDisplacementPointPatchVectorField::write(), fixedShearStressFvPatchVectorField::write(), waveDisplacementPointPatchVectorField::write(), interpolationTable< scalar >::write(), adjointFarFieldVelocityFvPatchVectorField::write(), adjointFarFieldNuaTildaFvPatchScalarField::write(), adjointInletNuaTildaFvPatchScalarField::write(), constantAlphaContactAngleFvPatchScalarField::write(), adjointInletVelocityFvPatchVectorField::write(), rigidBodyModelState::write(), dynamicAlphaContactAngleFvPatchScalarField::write(), prescribedRotation::write(), fixedNormalSlipPointPatchField< Type >::write(), adjointOutletNuaTildaFluxFvPatchScalarField::write(), adjointOutletVelocityFvPatchVectorField::write(), adjointWallVelocityFvPatchVectorField::write(), alphaContactAngleTwoPhaseFvPatchScalarField::write(), oscillatingVelocityPointPatchVectorField::write(), angularOscillatingDisplacementPointPatchVectorField::write(), angularOscillatingVelocityPointPatchVectorField::write(), solidBodyMotionDisplacementPointPatchVectorField::write(), rigidBody::write(), adjointFarFieldPressureFvPatchScalarField::write(), genericPointPatchField< Type >::write(), sixDoFRigidBodyMotionState::write(), patchIdentifier::write(), surfZoneIdentifier::write(), rhoConst< Specie >::write(), JohnsonJacksonParticleSlipFvPatchVectorField::write(), JohnsonJacksonParticleThetaFvPatchScalarField::write(), waveAlphaFvPatchScalarField::write(), waveVelocityFvPatchVectorField::write(), sutherlandTransport< Thermo >::write(), hConstThermo< EquationOfState >::write(), interpolationLookUpTable< scalar >::write(), totalFlowRateAdvectiveDiffusiveFvPatchScalarField::write(), genericPolyPatch::write(), adjointOutletVelocityFluxFvPatchVectorField::write(), alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::write(), solidReaction< ReactionThermo >::write(), hRefConstThermo< EquationOfState >::write(), uniformInterpolatedDisplacementPointPatchVectorField::write(), restraint::write(), eConstThermo< EquationOfState >::write(), perfectFluid< Specie >::write(), incompressiblePerfectGas< Specie >::write(), linear< Type >::write(), nutkFilmWallFunctionFvPatchScalarField::write(), sixDoFRigidBodyDisplacementPointPatchVectorField::write(), genericFvsPatchField< Type >::write(), temperatureCoupledBase::write(), genericFaPatchField< Type >::write(), genericFvPatchField< Type >::write(), polynomialSolidTransport< Thermo, PolySize >::write(), adiabaticPerfectFluid< Specie >::write(), mappedPatchFieldBase< Type >::write(), mappedFlowRateFvPatchVectorField::write(), outletMappedUniformInletFvPatchField< Type >::write(), Boussinesq< Specie >::write(), nutUTabulatedWallFunctionFvPatchScalarField::write(), polynomialTransport< Thermo, PolySize >::write(), variableHeightFlowRateInletVelocityFvPatchVectorField::write(), lumpedMassWallTemperatureFvPatchScalarField::write(), variableHeightFlowRateFvPatchScalarField::write(), fixedJumpAMIFvPatchField< scalar >::write(), matchedFlowRateOutletVelocityFvPatchVectorField::write(), outletPhaseMeanVelocityFvPatchVectorField::write(), rotatingPressureInletOutletVelocityFvPatchVectorField::write(), regionCoupledBase::write(), fixedJumpFvPatchField< vector >::write(), alphaContactAngleFvPatchScalarField::write(), janafThermo< EquationOfState >::write(), surfaceSlipDisplacementPointPatchVectorField::write(), alphatWallFunctionFvPatchScalarField::write(), nutUBlendedWallFunctionFvPatchScalarField::write(), logPolynomialTransport< Thermo, PolySize >::write(), swirlInletVelocityFvPatchVectorField::write(), cylindricalInletVelocityFvPatchVectorField::write(), icoPolynomial< Specie, PolySize >::write(), convectiveHeatTransferFvPatchScalarField::write(), surfaceDisplacementPointPatchVectorField::write(), turbulentIntensityKineticEnergyInletFvPatchScalarField::write(), cyclicPeriodicAMIPolyPatch::write(), kLowReWallFunctionFvPatchScalarField::write(), rotatingWallVelocityFvPatchVectorField::write(), outletMappedUniformInletHeatAdditionFvPatchField::write(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write(), turbulentMixingLengthDissipationRateInletFvPatchScalarField::write(), alphatFilmWallFunctionFvPatchScalarField::write(), turbulentMixingLengthFrequencyInletFvPatchScalarField::write(), rigidBodyMotion::write(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::write(), mappedVariableThicknessWallPolyPatch::write(), swirlFlowRateInletVelocityFvPatchVectorField::write(), freestreamFvPatchField< Type >::write(), alphatJayatillekeWallFunctionFvPatchScalarField::write(), pressureNormalInletOutletVelocityFvPatchVectorField::write(), SRFFreestreamVelocityFvPatchVectorField::write(), fixedProfileFvPatchField< Type >::write(), codedFixedValueFvPatchField< Type >::write(), joint::write(), totalTemperatureFvPatchScalarField::write(), codedFixedValuePointPatchField< Type >::write(), hPolynomialThermo< EquationOfState, PolySize >::write(), alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::write(), waveTransmissiveFvPatchField< Type >::write(), inletOutletTotalTemperatureFvPatchScalarField::write(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::write(), codedMixedFvPatchField< Type >::write(), flowRateInletVelocityFvPatchVectorField::write(), SRFVelocityFvPatchVectorField::write(), advectiveFvPatchField< Type >::write(), thermalBaffle1DFvPatchScalarField< solidType >::write(), uniformTotalPressureFvPatchScalarField::write(), uniformDensityHydrostaticPressureFvPatchScalarField::write(), faPatch::write(), fixedNormalInletOutletVelocityFvPatchVectorField::write(), porousBafflePressureFvPatchField< Type >::write(), externalCoupledTemperatureMixedFvPatchScalarField::write(), fanPressureFvPatchScalarField::write(), supersonicFreestreamFvPatchVectorField::write(), fanFvPatchField< Type >::write(), turbulentInletFvPatchField< Type >::write(), syringePressureFvPatchScalarField::write(), outletMachNumberPressureFvPatchScalarField::write(), activeBaffleVelocityFvPatchVectorField::write(), swirlFanVelocityFvPatchField::write(), cyclicACMIPolyPatch::write(), waveMakerPointPatchVectorField::write(), thermalBaffleFvPatchScalarField::write(), phaseHydrostaticPressureFvPatchScalarField::write(), oldCyclicPolyPatch::write(), processorFaPatch::write(), Reaction< ReactionThermo >::write(), atmBoundaryLayer::write(), faePatchField< Type >::write(), activePressureForceBaffleVelocityFvPatchVectorField::write(), epsilonWallFunctionFvPatchScalarField::write(), pressurePIDControlInletVelocityFvPatchVectorField::write(), sixDoFRigidBodyMotion::write(), plenumPressureFvPatchScalarField::write(), fvsPatchField< Type >::write(), rigidBodyModel::write(), coupledPolyPatch::write(), polyPatch::write(), externalWallHeatFluxTemperatureFvPatchScalarField::write(), processorPolyPatch::write(), processorCyclicPolyPatch::write(), humidityTemperatureCoupledMixedFvPatchScalarField::write(), cyclicPolyPatch::write(), turbulentDFSEMInletFvPatchVectorField::write(), cyclicAMIPolyPatch::write(), faPatchField< Type >::write(), pointPatchField< vector >::write(), mappedPatchBase::write(), totalPressureFvPatchScalarField::write(), fvPatchField< vector >::write(), turbulentDigitalFilterInletFvPatchVectorField::write(), UniformDimensionedField< vector >::writeData(), RASTurbulenceModel::writeData(), TableFile< Type >::writeData(), simple::writeData(), CSV< Type >::writeData(), ramp::writeData(), adjointSimple::writeData(), Sine< Type >::writeData(), Square< Type >::writeData(), MappedFile< Type >::writeData(), profiling::writeData(), Sampled< Type >::writeData(), MRFZone::writeData(), DimensionedField< Type, Foam::pointMesh >::writeData(), option::writeData(), setUpdater::writeDict(), perfectInterface::writeDict(), surfZone::writeDict(), geometricSurfacePatch::writeDict(), colourTable::writeDict(), lumpedPointState::writeDict(), attachDetach::writeDict(), plane::writeDict(), slidingInterface::writeDict(), lumpedPointMovement::writeDict(), identity::writeEntry(), orientedType::writeEntry(), cylindrical::writeEntry(), starcd::writeEntry(), axisAngle::writeEntry(), euler::writeEntry(), axes::writeEntry(), indirect::writeEntry(), coordinateSystem::writeEntry(), Ostream::writeEntryIfDifferent(), fWallFunctionFvPatchScalarField::writeLocalEntries(), v2WallFunctionFvPatchScalarField::writeLocalEntries(), nutWallFunctionFvPatchScalarField::writeLocalEntries(), epsilonWallFunctionFvPatchScalarField::writeLocalEntries(), omegaWallFunctionFvPatchScalarField::writeLocalEntries(), ensightPartCells::writeSummary(), and ensightPartFaces::writeSummary().

Here is the call graph for this function:

◆ writeEntryIfDifferent()

Ostream& writeEntryIfDifferent ( const word key,
const T value1,
const T value2 
)
inline

Write a keyword/value entry only when the two values differ.

Parameters
keythe name of the entry
value1the reference value
value2the value to write if it differs from value1

Definition at line 220 of file Ostream.H.

References Ostream::writeEntry().

Referenced by cpuInfo::write(), tableReader< scalar >::write(), profilingInformation::write(), specie::write(), inclinedFilmNusseltHeightFvPatchScalarField::write(), inclinedFilmNusseltInletVelocityFvPatchVectorField::write(), inletOutletFaPatchField< Type >::write(), atmBoundaryLayerInletEpsilonFvPatchScalarField::write(), atmBoundaryLayerInletKFvPatchScalarField::write(), interstitialInletVelocityFvPatchVectorField::write(), atmBoundaryLayerInletVelocityFvPatchVectorField::write(), nutkFilmWallFunctionFvPatchScalarField::write(), semiPermeableBaffleVelocityFvPatchVectorField::write(), mappedVelocityFluxFixedValueFvPatchField::write(), outletInletFvPatchField< Type >::write(), filmPyrolysisTemperatureCoupledFvPatchScalarField::write(), filmPyrolysisVelocityCoupledFvPatchVectorField::write(), temperatureDependentAlphaContactAngleFvPatchScalarField::write(), mappedFlowRateFvPatchVectorField::write(), outletMappedUniformInletFvPatchField< Type >::write(), greyDiffusiveRadiationMixedFvPatchScalarField::write(), freestreamPressureFvPatchScalarField::write(), inletOutletFvPatchField< Type >::write(), variableHeightFlowRateFvPatchScalarField::write(), matchedFlowRateOutletVelocityFvPatchVectorField::write(), pressureInletVelocityFvPatchVectorField::write(), timeVaryingMappedFixedValuePointPatchField< Type >::write(), surfaceSlipDisplacementPointPatchVectorField::write(), fixedPressureCompressibleDensityFvPatchScalarField::write(), MarshakRadiationFvPatchScalarField::write(), uniformInletOutletFvPatchField< Type >::write(), fluxCorrectedVelocityFvPatchVectorField::write(), surfaceDisplacementPointPatchVectorField::write(), turbulentIntensityKineticEnergyInletFvPatchScalarField::write(), cyclicPeriodicAMIPolyPatch::write(), outletMappedUniformInletHeatAdditionFvPatchField::write(), alphatFilmWallFunctionFvPatchScalarField::write(), semiPermeableBaffleMassFractionFvPatchScalarField::write(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::write(), swirlFlowRateInletVelocityFvPatchVectorField::write(), freestreamFvPatchField< Type >::write(), pressureInletOutletParSlipVelocityFvPatchVectorField::write(), pressureInletOutletVelocityFvPatchVectorField::write(), flowRateOutletVelocityFvPatchVectorField::write(), totalTemperatureFvPatchScalarField::write(), waveSurfacePressureFvPatchScalarField::write(), prghTotalHydrostaticPressureFvPatchScalarField::write(), inletOutletTotalTemperatureFvPatchScalarField::write(), waveTransmissiveFvPatchField< Type >::write(), flowRateInletVelocityFvPatchVectorField::write(), advectiveFvPatchField< Type >::write(), pressureDirectedInletVelocityFvPatchVectorField::write(), prghPressureFvPatchScalarField::write(), uniformTotalPressureFvPatchScalarField::write(), pressureDirectedInletOutletVelocityFvPatchVectorField::write(), fixedNormalInletOutletVelocityFvPatchVectorField::write(), porousBafflePressureFvPatchField< Type >::write(), supersonicFreestreamFvPatchVectorField::write(), filmHeightInletVelocityFvPatchVectorField::write(), prghTotalPressureFvPatchScalarField::write(), fanFvPatchField< Type >::write(), syringePressureFvPatchScalarField::write(), activeBaffleVelocityFvPatchVectorField::write(), outletMachNumberPressureFvPatchScalarField::write(), swirlFanVelocityFvPatchField::write(), phaseHydrostaticPressureFvPatchScalarField::write(), activePressureForceBaffleVelocityFvPatchVectorField::write(), pressurePIDControlInletVelocityFvPatchVectorField::write(), plenumPressureFvPatchScalarField::write(), processorCyclicPolyPatch::write(), humidityTemperatureCoupledMixedFvPatchScalarField::write(), turbulentDFSEMInletFvPatchVectorField::write(), totalPressureFvPatchScalarField::write(), turbulentDigitalFilterInletFvPatchVectorField::write(), MappedFile< Type >::writeData(), TableBase< Type >::writeEntries(), and nutUSpaldingWallFunctionFvPatchScalarField::writeLocalEntries().

Here is the call graph for this function:

◆ flush()

virtual void flush ( )
pure virtual

Flush stream.

Implemented in UOPstream, and OSstream.

Referenced by Foam::flush(), STARCDsurfaceFormatCore::writeCase(), STARCDedgeFormat::writeCase(), and STARCDCore::writePoints().

Here is the caller graph for this function:

◆ endl()

virtual void endl ( )
pure virtual

Add newline and flush stream.

Implemented in UOPstream, and OSstream.

Referenced by Foam::endl().

Here is the caller graph for this function:

◆ fill() [1/2]

virtual char fill ( ) const
pure virtual

Get padding character.

Implemented in UOPstream, and OSstream.

Referenced by Foam::setfill().

Here is the caller graph for this function:

◆ fill() [2/2]

virtual char fill ( const char  fillch)
pure virtual

Set padding character for formatted field up to field width.

Implemented in UOPstream, and OSstream.

◆ width() [1/2]

virtual int width ( ) const
pure virtual

Get width of output field.

Implemented in UOPstream, and OSstream.

Referenced by writeFile::initStream(), and Foam::setw().

Here is the caller graph for this function:

◆ width() [2/2]

virtual int width ( const int  w)
pure virtual

Set width of output field (and return old width)

Implemented in UOPstream, and OSstream.

◆ precision() [1/2]

virtual int precision ( ) const
pure virtual

Get precision of output field.

Implemented in UOPstream, and OSstream.

Referenced by writeFile::initStream(), NASCore::setPrecision(), Foam::setprecision(), dimensionSet::write(), and STARCDCore::writePoints().

Here is the caller graph for this function:

◆ precision() [2/2]

virtual int precision ( const int  p)
pure virtual

Set precision of output field (and return old precision)

Implemented in UOPstream, and OSstream.

◆ operator()()

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 267 of file Ostream.H.

Member Data Documentation

◆ indentSize_

const unsigned short indentSize_ = 4
staticprotected

Number of spaces per indent level.

Definition at line 65 of file Ostream.H.

◆ entryIndentation_

const unsigned short entryIndentation_ = 16
staticprotected

Indentation of the entry from the start of the keyword.

Definition at line 68 of file Ostream.H.

◆ indentLevel_

unsigned short indentLevel_
protected

Current indent level.

Definition at line 71 of file Ostream.H.

Referenced by Ostream::decrIndent(), Ostream::incrIndent(), and Ostream::indentLevel().


The documentation for this class was generated from the following files:
Foam::Ostream::endEntry
virtual Ostream & endEntry()
Write end entry (';') followed by newline.
Definition: Ostream.C:112