An Ostream is an abstract base class for all output systems (streams, files, token lists, etc). More...
#include <OpenFOAM/Ostream.H>
An Ostream is an abstract base class for all output systems (streams, files, token lists, etc).
Definition at line 54 of file Ostream.H.
Public Member Functions | |
Ostream (streamFormat format=ASCII, versionNumber version=currentVersion, compressionType compression=UNCOMPRESSED) | |
Set stream status.
| |
virtual | ~Ostream () |
Destructor.
| |
virtual Ostream & | write (const token &)=0 |
Write next token to stream.
| |
virtual Ostream & | write (const char)=0 |
Write character.
| |
virtual Ostream & | write (const char *)=0 |
Write character string.
| |
virtual Ostream & | write (const word &)=0 |
Write word.
| |
virtual Ostream & | write (const keyType &) |
Write keyType.
| |
virtual Ostream & | write (const string &)=0 |
Write string.
| |
virtual Ostream & | writeQuoted (const std::string &, const bool quoted=true)=0 |
Write std::string surrounded by quotes.
| |
virtual Ostream & | write (const label)=0 |
Write label.
| |
virtual Ostream & | write (const floatScalar)=0 |
Write floatScalar.
| |
virtual Ostream & | write (const doubleScalar)=0 |
Write doubleScalar.
| |
virtual Ostream & | write (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.
| |
Ostream & | writeKeyword (const keyType &) |
Write the keyword followed by an appropriate indentation.
| |
virtual void | flush ()=0 |
Flush stream.
| |
virtual void | endl ()=0 |
Add newline 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)
| |
Ostream & | operator() () const |
Return a non-const reference to const Ostream.
| |
Protected Attributes | |
unsigned short | indentLevel_ |
Current indent level.
| |
Static Protected Attributes | |
static const unsigned short | indentSize_ = 4 |
Number of spaces per indent level.
| |
static const unsigned short | entryIndentation_ = 16 |
Indentation of the entry from the start of the keyword.
|
Ostream | ( | streamFormat | format = ASCII ,
|
versionNumber | version = currentVersion ,
|
||
compressionType | compression = UNCOMPRESSED
|
||
) | [inline]
|
Write next token to stream.
Implemented in OPstream, OSstream, and prefixOSstream.
Referenced by autoHexMeshDriver::autoHexMeshDriver(), hexRef8::consistentSlowRefinement2(), Foam::operator<<(), errorDrivenRefinement::setRefinement(), hexRef8::setRefinement(), refinementIterator::setRefinement(), dsmcFields::write(), dictionaryEntry::write(), Particle< ParticleType >::write(), ensightFile::write(), actuationDiskSource::writeData(), porousZone::writeDict(), interpolate::writeInterpolateField(), and randomise::writeRandomField().
virtual Ostream& write | ( | const | char ) | [pure virtual]
|
Write character.
Implemented in OPstream, OSstream, and prefixOSstream.
virtual Ostream& write | ( | const char * | ) | [pure virtual]
|
Write character string.
Implemented in OPstream, OSstream, and prefixOSstream.
Write word.
Implemented in OPstream, OSstream, and prefixOSstream.
Foam::Ostream & write | ( | const keyType & | kw ) | [virtual]
|
Write string.
Implemented in ensightFile, OPstream, OSstream, and prefixOSstream.
virtual Ostream& writeQuoted | ( | const std::string & | , |
const bool | quoted = true
|
||
) | [pure virtual]
|
Write std::string surrounded by quotes.
Optional write without quotes.
Implemented in OPstream, OSstream, and prefixOSstream.
Referenced by Foam::operator<<().
virtual Ostream& write | ( | const | label ) | [pure virtual]
|
Write label.
Implemented in OPstream, OSstream, and prefixOSstream.
virtual Ostream& write | ( | const | floatScalar ) | [pure virtual]
|
Write floatScalar.
Implemented in OPstream, OSstream, and prefixOSstream.
virtual Ostream& write | ( | const | doubleScalar ) | [pure virtual]
|
Write doubleScalar.
Implemented in OPstream, OSstream, and prefixOSstream.
virtual Ostream& write | ( | const char * | , |
std::streamsize | |||
) | [pure virtual]
|
Write binary block.
Implemented in ensightFile, OPstream, OSstream, and prefixOSstream.
virtual void indent | ( | ) | [pure virtual]
|
Add indentation characters.
Implemented in OPstream, OSstream, and prefixOSstream.
Referenced by Foam::indent(), and dictionaryEntry::write().
unsigned short indentLevel | ( | ) | const [inline]
|
unsigned short& indentLevel | ( | ) | [inline]
|
void incrIndent | ( | ) | [inline]
|
Incrememt the indent level.
Definition at line 153 of file Ostream.H.
References Ostream::indentLevel_.
Referenced by Foam::incrIndent().
void decrIndent | ( | ) |
Decrememt the indent level.
Definition at line 35 of file Ostream.C.
References Ostream::endl(), and Ostream::indentLevel_.
Referenced by Foam::decrIndent().
Foam::Ostream & writeKeyword | ( | const keyType & | kw ) |
Write the keyword followed by an appropriate indentation.
Definition at line 59 of file Ostream.C.
References Foam::indent(), keyType::isPattern(), and token::SPACE.
Referenced by Foam::operator<<(), nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write(), kappatJayatillekeWallFunctionFvPatchScalarField::write(), incompressible::fixedShearStressFvPatchVectorField::write(), incompressible::atmBoundaryLayerInletVelocityFvPatchVectorField::write(), incompressible::atmBoundaryLayerInletEpsilonFvPatchScalarField::write(), mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write(), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write(), turbulentTemperatureCoupledBaffleFvPatchScalarField::write(), incompressible::turbulentMixingLengthFrequencyInletFvPatchScalarField::write(), turbulentMixingLengthFrequencyInletFvPatchScalarField::write(), incompressible::turbulentMixingLengthDissipationRateInletFvPatchScalarField::write(), turbulentMixingLengthDissipationRateInletFvPatchScalarField::write(), incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::write(), turbulentHeatFluxTemperatureFvPatchScalarField::write(), alphaSgsJayatillekeWallFunctionFvPatchScalarField::write(), timeVaryingAlphaContactAngleFvPatchScalarField::write(), dynamicAlphaContactAngleFvPatchScalarField::write(), constantAlphaContactAngleFvPatchScalarField::write(), alphaContactAngleFvPatchScalarField::write(), interpolationLookUpTable< Type >::write(), wideBandDiffusiveRadiationMixedFvPatchScalarField::write(), MarshakRadiationFixedTMixedFvPatchScalarField::write(), MarshakRadiationFvPatchScalarField::write(), greyDiffusiveRadiationMixedFvPatchScalarField::write(), surfZoneIdentifier::write(), sixDoFRigidBodyMotionState::write(), tabulatedAxialAngularSpring::write(), sphericalAngularSpring::write(), linearSpring::write(), linearAxialAngularSpring::write(), sixDoFRigidBodyMotion::write(), sixDoFRigidBodyMotionConstraint::write(), fixedPoint::write(), fixedPlane::write(), fixedLine::write(), fixedAxis::write(), sixDoFRigidBodyDisplacementPointPatchVectorField::write(), polyPatch::write(), processorPolyPatch::write(), cyclicPolyPatch::write(), genericPolyPatch::write(), patchIdentifier::write(), tableReader< Type >::write(), csvTableReader< Type >::write(), interpolationTable< Type >::write(), pointPatchField< Type >::write(), uniformFixedValuePointPatchField< Type >::write(), fixedNormalSlipPointPatchField< Type >::write(), primitiveEntry::write(), directMappedPatchBase::write(), genericPointPatchField< Type >::write(), genericFvPatchField< Type >::write(), surfaceSlipDisplacementPointPatchVectorField::write(), surfaceDisplacementPointPatchVectorField::write(), oscillatingVelocityPointPatchVectorField::write(), oscillatingDisplacementPointPatchVectorField::write(), angularOscillatingVelocityPointPatchVectorField::write(), angularOscillatingDisplacementPointPatchVectorField::write(), fvsPatchField< Type >::write(), fvPatchField< Type >::write(), waveTransmissiveFvPatchField< Type >::write(), uniformFixedValueFvPatchField< Type >::write(), uniformDensityHydrostaticPressureFvPatchScalarField::write(), turbulentIntensityKineticEnergyInletFvPatchScalarField::write(), turbulentInletFvPatchField< Type >::write(), translatingWallVelocityFvPatchVectorField::write(), totalTemperatureFvPatchScalarField::write(), timeVaryingUniformTotalPressureFvPatchScalarField::write(), timeVaryingMappedPressureDirectedInletVelocityFvPatchVectorField::write(), timeVaryingMappedFixedValueFvPatchField< Type >::write(), syringePressureFvPatchScalarField::write(), swirlFlowRateInletVelocityFvPatchVectorField::write(), supersonicFreestreamFvPatchVectorField::write(), rotatingWallVelocityFvPatchVectorField::write(), rotatingTotalPressureFvPatchScalarField::write(), rotatingPressureInletOutletVelocityFvPatchVectorField::write(), pressureNormalInletOutletVelocityFvPatchVectorField::write(), pressureInletVelocityFvPatchVectorField::write(), pressureInletOutletVelocityFvPatchVectorField::write(), pressureDirectedInletVelocityFvPatchVectorField::write(), pressureDirectedInletOutletVelocityFvPatchVectorField::write(), outletMappedUniformInletFvPatchField< Type >::write(), oscillatingFixedValueFvPatchField< Type >::write(), inletOutletTotalTemperatureFvPatchScalarField::write(), inletOutletFvPatchField< Type >::write(), freestreamFvPatchField< Type >::write(), fluxCorrectedVelocityFvPatchVectorField::write(), flowRateInletVelocityFvPatchVectorField::write(), fixedPressureCompressibleDensityFvPatchScalarField::write(), fixedFluxPressureFvPatchScalarField::write(), fanFvPatchField< Type >::write(), directMappedVelocityFluxFixedValueFvPatchField::write(), directMappedFixedValueFvPatchField< Type >::write(), cylindricalInletVelocityFvPatchVectorField::write(), buoyantPressureFvPatchScalarField::write(), advectiveFvPatchField< Type >::write(), activeBaffleVelocityFvPatchVectorField::write(), SRFVelocityFvPatchVectorField::write(), SRFFreestreamVelocityFvPatchVectorField::write(), boundaryPatch::write(), UniformDimensionedField< Type >::writeData(), DimensionedField< Type, GeoMesh >::writeData(), TimeActivatedExplicitSource< Type >::writeData(), explicitSource::writeData(), basicSource::writeData(), actuationDiskSource::writeData(), ensightPart::writeData(), surfZone::writeDict(), plane::writeDict(), toroidalCS::writeDict(), coordinateSystem::writeDict(), porousZone::writeDict(), Field< Type >::writeEntry(), UList< T >::writeEntry(), FixedList< T, Size >::writeEntry(), fvPatchField< Type >::writeEntryIfDifferent(), nutWallFunctionFvPatchScalarField::writeLocalEntries(), mutWallFunctionFvPatchScalarField::writeLocalEntries(), mutkWallFunctionFvPatchScalarField::writeLocalEntries(), and ensightPart::writeSummary().
virtual void flush | ( | ) | [pure virtual]
|
Flush stream.
Implemented in OPstream, and OSstream.
Referenced by OSstream::flush(), Foam::flush(), wordRe::info(), STARCDsurfaceFormatCore::writeCase(), and STARCDsurfaceFormatCore::writePoints().
virtual void endl | ( | ) | [pure virtual]
|
Add newline and flush stream.
Implemented in OPstream, and OSstream.
Referenced by Ostream::decrIndent(), and Foam::endl().
virtual int width | ( | ) | const [pure virtual]
|
virtual int width | ( | const int | w ) | [pure virtual]
|
virtual int precision | ( | ) | const [pure virtual]
|
Get precision of output field.
Implemented in OPstream, and OSstream.
Referenced by Foam::operator<<(), Foam::setprecision(), and STARCDsurfaceFormatCore::writePoints().
virtual int precision | ( | const int | p ) | [pure virtual]
|
Ostream& operator() | ( | ) | const [inline]
|
const unsigned short indentSize_ = 4 [static, protected]
|
const unsigned short entryIndentation_ = 16 [static, protected]
|
unsigned short indentLevel_ [protected]
|
Current indent level.
Definition at line 70 of file Ostream.H.
Referenced by Ostream::decrIndent(), Ostream::incrIndent(), and Ostream::indentLevel().