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 (const Ostream &)=default
 Copy construct. More...
 
virtual ~Ostream ()=default
 Destructor. More...
 
 Ostream (IOstreamOption streamOpt=IOstreamOption())
 
 Ostream (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver=IOstreamOption::currentVersion, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED)
 Construct with format, version (compression) 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 OstreamwriteRaw (const char *data, std::streamsize count)=0
 Low-level raw binary output. More...
 
virtual bool beginRawWrite (std::streamsize count)=0
 Emit begin marker for low-level raw binary output. More...
 
virtual bool endRawWrite ()=0
 Emit end marker for low-level raw binary output. More...
 
virtual void indent ()=0
 Add indentation characters. More...
 
unsigned short indentSize () const noexcept
 Return indent size (spaces per level) More...
 
unsigned short indentSize (unsigned short val) noexcept
 Change indent size (spaces per level), return old value. More...
 
unsigned short indentLevel () const noexcept
 Return the indent level. More...
 
unsigned short indentLevel (unsigned short val) noexcept
 Change the indent level, return old value. More...
 
void incrIndent () noexcept
 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...
 
unsigned short & indentLevel () noexcept
 Access to indent level. More...
 
unsigned short & indentSize () noexcept
 Access to indent size. More...
 
- Public Member Functions inherited from IOstream
 IOstream (const IOstream &)=default
 Copy construct. More...
 
virtual ~IOstream ()=default
 Destructor. More...
 
 IOstream (IOstreamOption streamOpt=IOstreamOption())
 
 IOstream (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED)
 Construct with format, version (compression) More...
 
virtual const fileNamename () const
 Return the name of the stream. More...
 
virtual fileNamename ()
 Return stream name for modification. More...
 
fileName relativeName () const
 Return the name of the stream relative to the current case. More...
 
virtual bool check (const char *operation) const
 Check IOstream status for given operation. More...
 
bool fatalCheck (const char *operation) const
 Check IOstream status for given operation. More...
 
bool opened () const noexcept
 True if stream has been opened. More...
 
bool closed () const noexcept
 True if stream is closed. More...
 
bool good () const noexcept
 True if next operation might succeed. More...
 
bool eof () const noexcept
 True if end of input seen. More...
 
bool fail () const noexcept
 True if next operation will fail. More...
 
bool bad () const noexcept
 True if stream is corrupted. More...
 
 operator bool () const noexcept
 Return true if the stream has not failed. More...
 
bool operator! () const noexcept
 Return true if the stream has failed. More...
 
unsigned labelByteSize () const noexcept
 The sizeof (label) in bytes associated with the stream. More...
 
unsigned scalarByteSize () const noexcept
 The sizeof (scalar) in bytes associated with the stream. More...
 
void setLabelByteSize (unsigned nbytes) noexcept
 Set the sizeof (label) in bytes associated with the stream. More...
 
void setScalarByteSize (unsigned nbytes) noexcept
 Set the sizeof (scalar) in bytes associated with the stream. More...
 
template<class T = label>
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize () const noexcept
 
template<class T = scalar>
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize () const noexcept
 
label lineNumber () const noexcept
 Const access to the current stream line number. More...
 
label & lineNumber () noexcept
 Non-const access to the current stream line number. More...
 
label lineNumber (const label num) noexcept
 Set the stream line number. More...
 
virtual ios_base::fmtflags flags () const =0
 Return flags of stream. More...
 
void setEof () noexcept
 Set stream state as reached 'eof'. More...
 
void setFail () noexcept
 Set stream state as 'failed'. More...
 
void setBad ()
 Set stream state 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 stream description 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
constexpr IOstreamOption (streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
 
constexpr IOstreamOption (streamFormat fmt, compressionType comp, versionNumber ver) noexcept
 Construct from components (format, compression, version) More...
 
constexpr IOstreamOption (streamFormat fmt, versionNumber ver, compressionType comp=compressionType::UNCOMPRESSED) noexcept
 Construct from components (format, version, compression) More...
 
 IOstreamOption (const IOstreamOption &opt, streamFormat fmt) noexcept
 Copy construct with change of format. More...
 
streamFormat format () const noexcept
 Get the current stream format. More...
 
streamFormat format (const streamFormat fmt) 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 &compName)
 Set the stream compression from string value. More...
 
versionNumber version () const noexcept
 Get the stream version. More...
 
versionNumber version (const versionNumber ver) noexcept
 Set the stream version. More...
 
versionNumber version (const token &tok)
 Set the stream version from token. More...
 

Protected Attributes

unsigned short indentSize_ = 4
 Number of spaces per indent level. More...
 
unsigned short indentLevel_ = 0
 Current indent level. More...
 
- Protected Attributes inherited from IOstream
std::ios_base::iostate ioState_
 Mirror of internal stream io state. More...
 
streamAccess openClosed_
 The stream open/closed state. More...
 
unsigned char sizeofLabel_
 The sizeof (label), possibly read from the header. More...
 
unsigned char sizeofScalar_
 The sizeof (scalar), possibly read from the header. More...
 
label lineNumber_
 The file line. More...
 

Static Protected Attributes

static constexpr 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 stream open/closed state. More...
 
- Public Types inherited from IOstreamOption
enum  streamFormat : char { ASCII = 0, 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 () noexcept
 Return the default precision. More...
 
static unsigned int defaultPrecision (unsigned int prec) noexcept
 Reset the default precision. More...
 
- Static Public Member Functions inherited from IOstreamOption
static streamFormat formatEnum (const word &formatName, const streamFormat deflt=streamFormat::ASCII)
 
static streamFormat formatEnum (const word &key, const dictionary &dict, const streamFormat deflt=streamFormat::ASCII)
 Failsafe construct streamFormat from optional dictionary lookup. More...
 
static compressionType compressionEnum (const word &compName, const compressionType deflt=compressionType::UNCOMPRESSED)
 The compression enum corresponding to the string. More...
 
static compressionType compressionEnum (const word &key, const dictionary &dict, const compressionType deflt=compressionType::UNCOMPRESSED)
 Failsafe construct compressionType from optional dictionary lookup. 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 currentVersion
 The current version number (2.0) More...
 
- Protected Member Functions inherited from IOstream
void setOpened () noexcept
 Set stream opened. More...
 
void setClosed () noexcept
 Set stream closed. More...
 
void setState (std::ios_base::iostate state) noexcept
 Set stream state. More...
 
void setGood () noexcept
 Set stream state 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 56 of file Ostream.H.

Constructor & Destructor Documentation

◆ Ostream() [1/3]

Ostream ( const Ostream )
default

Copy construct.

◆ ~Ostream()

virtual ~Ostream ( )
virtualdefault

Destructor.

◆ Ostream() [2/3]

Ostream ( IOstreamOption  streamOpt = IOstreamOption())
inlineexplicit

Default construct (ASCII, uncompressed), construct with specified stream option

Definition at line 89 of file Ostream.H.

◆ Ostream() [3/3]

Construct with format, version (compression)

Definition at line 97 of file Ostream.H.

Member Function Documentation

◆ write() [1/11]

◆ write() [2/11]

virtual Ostream& write ( const char  c)
pure virtual

Write character.

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

◆ write() [3/11]

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

Write character string.

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

◆ write() [4/11]

virtual Ostream& write ( const word str)
pure virtual

Write word.

Implemented in prefixOSstream, ensightFile, UOPstream, OSstream, OTstream, 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(), and writeQuoted().

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, ensightFile, UOPstream, OSstream, OTstream, and OBJstream.

◆ 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, OTstream, and OBJstream.

◆ write() [7/11]

virtual Ostream& write ( const int32_t  val)
pure virtual

Write int32_t.

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

◆ write() [8/11]

virtual Ostream& write ( const int64_t  val)
pure virtual

Write int64_t.

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

◆ write() [9/11]

virtual Ostream& write ( const floatScalar  val)
pure virtual

Write floatScalar.

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

◆ write() [10/11]

virtual Ostream& write ( const doubleScalar  val)
pure virtual

Write doubleScalar.

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

◆ write() [11/11]

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

Write binary block.

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

◆ writeRaw()

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

Low-level raw binary output.

Implemented in UOPstream, OSstream, and OTstream.

◆ beginRawWrite()

virtual bool beginRawWrite ( std::streamsize  count)
pure virtual

Emit begin marker for low-level raw binary output.

The count indicates the number of bytes for subsequent writeRaw calls.

Implemented in UOPstream, OSstream, and OTstream.

◆ endRawWrite()

virtual bool endRawWrite ( )
pure virtual

Emit end marker for low-level raw binary output.

Implemented in UOPstream, OSstream, and OTstream.

◆ indent()

virtual void indent ( )
pure virtual

Add indentation characters.

Implemented in UOPstream, OSstream, OTstream, and prefixOSstream.

◆ indentSize() [1/3]

unsigned short indentSize ( ) const
inlinenoexcept

Return indent size (spaces per level)

Definition at line 174 of file Ostream.H.

References Ostream::indentSize_.

◆ indentSize() [2/3]

unsigned short indentSize ( unsigned short  val)
inlinenoexcept

Change indent size (spaces per level), return old value.

Definition at line 180 of file Ostream.H.

References Ostream::indentSize_.

◆ indentLevel() [1/3]

unsigned short indentLevel ( ) const
inlinenoexcept

Return the indent level.

Definition at line 188 of file Ostream.H.

References Ostream::indentLevel_.

◆ indentLevel() [2/3]

unsigned short indentLevel ( unsigned short  val)
inlinenoexcept

Change the indent level, return old value.

Definition at line 194 of file Ostream.H.

References Ostream::indentLevel_.

◆ incrIndent()

void incrIndent ( )
inlinenoexcept

Increment the indent level.

Definition at line 202 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 37 of file Ostream.C.

References Ostream::indentLevel_.

Referenced by Foam::decrIndent().

Here is the caller graph for this function:

◆ writeKeyword()

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

Write the keyword followed by an appropriate indentation.

Reimplemented in ensightFile, and ensightGeoFile.

Definition at line 57 of file Ostream.C.

References Foam::indent(), keyType::isPattern(), token::SPACE, Foam::vtk::write(), and writeQuoted().

Referenced by zoneIdentifier::write(), patchIdentifier::write(), primitiveEntry::write(), ensightFaces::writeDict(), ensightCells::writeDict(), and Ostream::writeEntry().

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

◆ 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 91 of file Ostream.C.

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

Referenced by Foam::operator<<(), Foam::printDOT(), specie::write(), surfacePatch::write(), surfZone::write(), rhoConst< Specie >::write(), WLFTransport< Thermo >::write(), icoTabulated< Specie >::write(), sutherlandTransport< Thermo >::write(), perfectFluid< Specie >::write(), linear< Type >::write(), hConstThermo< EquationOfState >::write(), profilingInformation::write(), eConstThermo< EquationOfState >::write(), janafThermo< EquationOfState >::write(), icoPolynomial< Specie, PolySize >::write(), rPolynomial< Specie >::write(), fixedNormalInletOutletVelocityFvPatchVectorField::write(), sixDoFRigidBodyMotion::write(), dictionary::write(), faBoundaryMesh::writeData(), profiling::writeData(), MRFZone::writeData(), polyBoundaryMesh::writeData(), setUpdater::writeDict(), perfectInterface::writeDict(), colourTable::writeDict(), cellZone::writeDict(), pointZone::writeDict(), attachDetach::writeDict(), ensightFaces::writeDict(), ensightCells::writeDict(), PDRblock::gridControl::writeDict(), plane::writeDict(), faceZone::writeDict(), slidingInterface::writeDict(), coordinateSystem::writeEntry(), dictionary::writeEntry(), Foam::writeFuncsImpl(), decomposedBlockData::writeHeader(), and IOobject::writeHeader().

Here is the call graph for this function:
Here is the caller 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 100 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 109 of file Ostream.C.

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

Referenced by Foam::operator<<(), Foam::printDOT(), surfacePatch::write(), specie::write(), surfZone::write(), rhoConst< Specie >::write(), WLFTransport< Thermo >::write(), icoTabulated< Specie >::write(), sutherlandTransport< Thermo >::write(), perfectFluid< Specie >::write(), linear< Type >::write(), hConstThermo< EquationOfState >::write(), profilingInformation::write(), eConstThermo< EquationOfState >::write(), janafThermo< EquationOfState >::write(), icoPolynomial< Specie, PolySize >::write(), rPolynomial< Specie >::write(), fixedNormalInletOutletVelocityFvPatchVectorField::write(), sixDoFRigidBodyMotion::write(), dictionary::write(), faBoundaryMesh::writeData(), profiling::writeData(), MRFZone::writeData(), polyBoundaryMesh::writeData(), setUpdater::writeDict(), perfectInterface::writeDict(), colourTable::writeDict(), cellZone::writeDict(), pointZone::writeDict(), attachDetach::writeDict(), ensightFaces::writeDict(), ensightCells::writeDict(), PDRblock::gridControl::writeDict(), plane::writeDict(), faceZone::writeDict(), slidingInterface::writeDict(), coordinateSystem::writeEntry(), dictionary::writeEntry(), Foam::writeFuncsImpl(), decomposedBlockData::writeHeader(), and IOobject::writeHeader().

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

◆ endEntry()

Foam::Ostream & endEntry ( )
virtual

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

Definition at line 118 of file Ostream.C.

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

Referenced by Foam::endEntry(), 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 236 of file Ostream.H.

References Ostream::endEntry(), Foam::glTF::key(), and Ostream::writeKeyword().

Referenced by Foam::operator<<(), thirdBodyEfficiencies::write(), TroeFallOffFunction::write(), SRIFallOffFunction::write(), cpuInfo::write(), CloudSubModelBase< CloudType >::write(), coupleGroupIdentifier::write(), boundaryPatch::write(), adjointWallVelocityLowReFvPatchVectorField::write(), adjointOutletPressureFvPatchScalarField::write(), memInfo::write(), csvTableReader< Type >::write(), surfacePatch::write(), specie::write(), fixedShearStressFvPatchVectorField::write(), waveDisplacementPointPatchVectorField::write(), adjointFarFieldVelocityFvPatchVectorField::write(), adjointRotatingWallVelocityFvPatchVectorField::write(), adjointInletVelocityFvPatchVectorField::write(), adjointOutletVelocityFvPatchVectorField::write(), adjointWallVelocityFvPatchVectorField::write(), sixDoFRigidBodyMotionState::write(), angularOscillatingDisplacementPointPatchVectorField::write(), angularOscillatingVelocityPointPatchVectorField::write(), surfZone::write(), adjointFarFieldPressureFvPatchScalarField::write(), rhoConst< Specie >::write(), JohnsonJacksonParticleSlipFvPatchVectorField::write(), WLFTransport< Thermo >::write(), JohnsonJacksonParticleThetaFvPatchScalarField::write(), waveVelocityFvPatchVectorField::write(), waveAlphaFvPatchScalarField::write(), totalFlowRateAdvectiveDiffusiveFvPatchScalarField::write(), icoTabulated< Specie >::write(), genericPolyPatch::write(), sutherlandTransport< Thermo >::write(), adjointOutletVelocityFluxFvPatchVectorField::write(), perfectFluid< Specie >::write(), surfZoneIdentifier::write(), zoneIdentifier::write(), linear< Type >::write(), hConstThermo< EquationOfState >::write(), profilingInformation::write(), eConstThermo< EquationOfState >::write(), geometricSurfacePatch::write(), copiedFixedValueFvPatchScalarField::write(), patchIdentifier::write(), mappedFlowRateFvPatchVectorField::write(), acousticWaveTransmissiveFvPatchField< Type >::write(), variableHeightFlowRateFvPatchScalarField::write(), faceAreaWeightAMI::write(), matchedFlowRateOutletVelocityFvPatchVectorField::write(), outletPhaseMeanVelocityFvPatchVectorField::write(), rotatingPressureInletOutletVelocityFvPatchVectorField::write(), surfaceSlipDisplacementPointPatchVectorField::write(), lumpedPointDisplacementPointPatchVectorField::write(), janafThermo< EquationOfState >::write(), nutUTabulatedWallFunctionFvPatchScalarField::write(), lumpedMassWallTemperatureFvPatchScalarField::write(), swirlInletVelocityFvPatchVectorField::write(), cylindricalInletVelocityFvPatchVectorField::write(), surfaceDisplacementPointPatchVectorField::write(), icoPolynomial< Specie, PolySize >::write(), rotatingWallVelocityFvPatchVectorField::write(), turbulentIntensityKineticEnergyInletFvPatchScalarField::write(), rPolynomial< Specie >::write(), outletMappedUniformInletHeatAdditionFvPatchField::write(), turbulentMixingLengthFrequencyInletFvPatchScalarField::write(), mappedVariableThicknessWallPolyPatch::write(), swirlFlowRateInletVelocityFvPatchVectorField::write(), fixedMultiPhaseHeatFluxFvPatchScalarField::write(), pressureNormalInletOutletVelocityFvPatchVectorField::write(), SRFFreestreamVelocityFvPatchVectorField::write(), totalTemperatureFvPatchScalarField::write(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::write(), inletOutletTotalTemperatureFvPatchScalarField::write(), waveTransmissiveFvPatchField< Type >::write(), SRFVelocityFvPatchVectorField::write(), nutUBlendedWallFunctionFvPatchScalarField::write(), flowRateInletVelocityFvPatchVectorField::write(), advectiveFvPatchField< Type >::write(), thermalBaffle1DFvPatchScalarField< solidType >::write(), uniformTotalPressureFvPatchScalarField::write(), turbulentMixingLengthDissipationRateInletFvPatchScalarField::write(), uniformDensityHydrostaticPressureFvPatchScalarField::write(), kLowReWallFunctionFvPatchScalarField::write(), fixedNormalInletOutletVelocityFvPatchVectorField::write(), porousBafflePressureFvPatchField< Type >::write(), supersonicFreestreamFvPatchVectorField::write(), syringePressureFvPatchScalarField::write(), faPatch::write(), fanPressureFvPatchScalarField::write(), activeBaffleVelocityFvPatchVectorField::write(), timeVaryingMassSorptionFvPatchScalarField::write(), outletMachNumberPressureFvPatchScalarField::write(), swirlFanVelocityFvPatchField::write(), phaseHydrostaticPressureFvPatchScalarField::write(), oldCyclicPolyPatch::write(), processorFaPatch::write(), activePressureForceBaffleVelocityFvPatchVectorField::write(), pressurePIDControlInletVelocityFvPatchVectorField::write(), plenumPressureFvPatchScalarField::write(), fvsPatchField< Type >::write(), sixDoFRigidBodyMotion::write(), waveMakerPointPatchVectorField::write(), cyclicACMIPolyPatch::write(), coupledPolyPatch::write(), externalWallHeatFluxTemperatureFvPatchScalarField::write(), processorPolyPatch::write(), processorCyclicPolyPatch::write(), polyPatch::write(), humidityTemperatureCoupledMixedFvPatchScalarField::write(), epsilonWallFunctionFvPatchScalarField::write(), cyclicPolyPatch::write(), totalPressureFvPatchScalarField::write(), turbulentDFSEMInletFvPatchVectorField::write(), omegaWallFunctionFvPatchScalarField::write(), electrostaticDepositionFvPatchScalarField::write(), cyclicAMIPolyPatch::write(), AMIInterpolation::write(), mappedPatchBase::write(), turbulentDigitalFilterInletFvPatchVectorField::write(), RASTurbulenceModel::writeData(), simple::writeData(), adjointSimple::writeData(), profiling::writeData(), MRFZone::writeData(), lumpedPointMovement::writeData(), setUpdater::writeDict(), perfectInterface::writeDict(), colourTable::writeDict(), cellZone::writeDict(), pointZone::writeDict(), attachDetach::writeDict(), ensightFaces::writeDict(), ensightCells::writeDict(), lumpedPointState::writeDict(), plane::writeDict(), faceZone::writeDict(), slidingInterface::writeDict(), orientedType::writeEntry(), coordinateSystem::writeEntry(), Ostream::writeEntryIfDifferent(), Foam::writeEntryIfPresent(), genericPatchFieldBase::writeGeneric(), and nutWallFunctionFvPatchScalarField::writeLocalEntries().

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

References Foam::glTF::key(), and Ostream::writeEntry().

Referenced by cpuInfo::write(), specie::write(), inclinedFilmNusseltHeightFvPatchScalarField::write(), inclinedFilmNusseltInletVelocityFvPatchVectorField::write(), interstitialInletVelocityFvPatchVectorField::write(), semiPermeableBaffleVelocityFvPatchVectorField::write(), hConstThermo< EquationOfState >::write(), mappedVelocityFluxFixedValueFvPatchField::write(), profilingInformation::write(), eConstThermo< EquationOfState >::write(), filmPyrolysisTemperatureCoupledFvPatchScalarField::write(), filmPyrolysisVelocityCoupledFvPatchVectorField::write(), mappedFlowRateFvPatchVectorField::write(), freestreamPressureFvPatchScalarField::write(), variableHeightFlowRateFvPatchScalarField::write(), matchedFlowRateOutletVelocityFvPatchVectorField::write(), pressureInletVelocityFvPatchVectorField::write(), cyclicPeriodicAMIPolyPatch::write(), surfaceSlipDisplacementPointPatchVectorField::write(), fixedPressureCompressibleDensityFvPatchScalarField::write(), surfaceDisplacementPointPatchVectorField::write(), turbulentIntensityKineticEnergyInletFvPatchScalarField::write(), outletMappedUniformInletHeatAdditionFvPatchField::write(), semiPermeableBaffleMassFractionFvPatchScalarField::write(), swirlFlowRateInletVelocityFvPatchVectorField::write(), pressureInletOutletParSlipVelocityFvPatchVectorField::write(), pressureInletOutletVelocityFvPatchVectorField::write(), flowRateOutletVelocityFvPatchVectorField::write(), totalTemperatureFvPatchScalarField::write(), waveSurfacePressureFvPatchScalarField::write(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::write(), prghTotalHydrostaticPressureFvPatchScalarField::write(), waveTransmissiveFvPatchField< Type >::write(), inletOutletTotalTemperatureFvPatchScalarField::write(), flowRateInletVelocityFvPatchVectorField::write(), advectiveFvPatchField< Type >::write(), pressureDirectedInletVelocityFvPatchVectorField::write(), prghPressureFvPatchScalarField::write(), uniformTotalPressureFvPatchScalarField::write(), pressureDirectedInletOutletVelocityFvPatchVectorField::write(), pressurePermeableAlphaInletOutletVelocityFvPatchVectorField::write(), fixedNormalInletOutletVelocityFvPatchVectorField::write(), porousBafflePressureFvPatchField< Type >::write(), supersonicFreestreamFvPatchVectorField::write(), filmHeightInletVelocityFvPatchVectorField::write(), prghTotalPressureFvPatchScalarField::write(), syringePressureFvPatchScalarField::write(), prghPermeableAlphaTotalPressureFvPatchScalarField::write(), activeBaffleVelocityFvPatchVectorField::write(), timeVaryingMassSorptionFvPatchScalarField::write(), outletMachNumberPressureFvPatchScalarField::write(), swirlFanVelocityFvPatchField::write(), phaseHydrostaticPressureFvPatchScalarField::write(), activePressureForceBaffleVelocityFvPatchVectorField::write(), pressurePIDControlInletVelocityFvPatchVectorField::write(), plenumPressureFvPatchScalarField::write(), processorCyclicPolyPatch::write(), humidityTemperatureCoupledMixedFvPatchScalarField::write(), totalPressureFvPatchScalarField::write(), turbulentDFSEMInletFvPatchVectorField::write(), electrostaticDepositionFvPatchScalarField::write(), cyclicAMIPolyPatch::write(), mappedPatchBase::write(), turbulentDigitalFilterInletFvPatchVectorField::write(), MappedFile< scalar >::writeData(), and nutUSpaldingWallFunctionFvPatchScalarField::writeLocalEntries().

Here is the call graph for this function:

◆ flush()

virtual void flush ( )
pure virtual

Flush stream.

Implemented in UOPstream, OSstream, and OTstream.

◆ endl()

virtual void endl ( )
pure virtual

Add newline and flush stream.

Implemented in UOPstream, OTstream, and OSstream.

◆ fill() [1/2]

virtual char fill ( ) const
pure virtual

Get padding character.

Implemented in UOPstream, OTstream, 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, OTstream, and OSstream.

◆ width() [1/2]

virtual int width ( ) const
pure virtual

Get width of output field.

Implemented in UOPstream, OTstream, and OSstream.

Referenced by 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, OTstream, and OSstream.

◆ precision() [1/2]

virtual int precision ( ) const
pure virtual

Get precision of output field.

Implemented in UOPstream, OTstream, and OSstream.

Referenced by Foam::setprecision().

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, OTstream, 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 295 of file Ostream.H.

◆ indentLevel() [3/3]

unsigned short& indentLevel ( )
inlinenoexcept

Access to indent level.

Definition at line 304 of file Ostream.H.

References Ostream::indentLevel_.

◆ indentSize() [3/3]

unsigned short& indentSize ( )
inlinenoexcept

Access to indent size.

Definition at line 310 of file Ostream.H.

References Ostream::indentSize_.

Member Data Documentation

◆ entryIndentation_

constexpr const unsigned short entryIndentation_ = 16
staticconstexprprotected

Indentation of the entry from the start of the keyword.

Definition at line 65 of file Ostream.H.

◆ indentSize_

unsigned short indentSize_ = 4
protected

Number of spaces per indent level.

Definition at line 68 of file Ostream.H.

Referenced by Ostream::indentSize().

◆ indentLevel_

unsigned short indentLevel_ = 0
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::glTF::key
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
Definition: foamGltfBase.H:108
Foam::Ostream::endEntry
virtual Ostream & endEntry()
Write end entry (';') followed by newline.
Definition: Ostream.C:118
os
OBJstream os(runTime.globalPath()/outputName)