An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc. More...
Public Types | |
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... | |
enum | appendType : char { NO_APPEND = 0, APPEND_APP, APPEND_ATE, NON_APPEND = NO_APPEND, APPEND = APPEND_APP } |
File appending (NO_APPEND | APPEND_APP | APPEND_ATE) More... | |
enum | atomicType : char { NON_ATOMIC = 0, ATOMIC } |
Atomic operations (output) More... | |
enum | floatFormat : unsigned { general = unsigned(0), fixed = unsigned(std::ios_base::fixed), scientific = unsigned(std::ios_base::scientific) } |
Float formats (eg, time directory name formats) More... | |
Public Member Functions | |
IOstream (const IOstream &)=default | |
Copy construct. More... | |
virtual | ~IOstream ()=default |
Destructor. More... | |
IOstream (IOstreamOption streamOpt=IOstreamOption()) | |
Default construct (ASCII, uncompressed), construct with specified stream option. More... | |
IOstream (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED) | |
Construct with format, version (compression) More... | |
virtual const fileName & | name () const |
The name of the stream. 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 |
Check if the label byte-size associated with the stream is the same as the given type. More... | |
template<class T = scalar> | |
std::enable_if< std::is_floating_point< T >::value, bool >::type | checkScalarSize () const noexcept |
Check if the scalar byte-size associated with the stream is the same as the given type. More... | |
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... | |
void | setEof () noexcept |
Set stream state as reached 'eof'. More... | |
void | setFail () noexcept |
Set stream state as 'failed'. More... | |
void | setBad () noexcept |
Set stream state to be 'bad'. More... | |
virtual std::ios_base::fmtflags | flags () const =0 |
Return current stream flags. More... | |
virtual std::ios_base::fmtflags | flags (std::ios_base::fmtflags)=0 |
Set stream flags, return old stream flags. More... | |
std::ios_base::fmtflags | setf (std::ios_base::fmtflags f) |
Set stream flag(s), return old stream flags. More... | |
std::ios_base::fmtflags | setf (const std::ios_base::fmtflags f, const std::ios_base::fmtflags mask) |
Set stream flag(s) with mask, return old stream flags. More... | |
void | unsetf (std::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< IOstream > | info () const noexcept |
Return info proxy, used to print IOstream information to a stream. More... | |
Public Member Functions inherited from IOstreamOption | |
constexpr | IOstreamOption (streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept |
Default construct (ASCII, UNCOMPRESSED, currentVersion) or construct with format, compression. More... | |
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... | |
Static Public Member Functions | |
static unsigned int | defaultPrecision () noexcept |
Return the default precision. More... | |
static unsigned int | defaultPrecision (unsigned int prec) noexcept |
Reset the default precision. More... | |
static unsigned int | minPrecision (unsigned int prec) noexcept |
Set the minimum default precision. More... | |
Static Public Member Functions inherited from IOstreamOption | |
static floatFormat | floatFormatEnum (const word &fmtName, const floatFormat deflt=floatFormat::general) |
Lookup floatFormat enum corresponding to the string (general | fixed | scientific). More... | |
static floatFormat | floatFormatEnum (const word &key, const dictionary &dict, const floatFormat deflt=floatFormat::general) |
getOrDefault floatFormat from dictionary, warn only on bad enumeration. More... | |
static streamFormat | formatEnum (const word &fmtName, const streamFormat deflt=streamFormat::ASCII) |
Lookup streamFormat enum corresponding to the string (ascii | binary). More... | |
static streamFormat | formatEnum (const word &key, const dictionary &dict, const streamFormat deflt=streamFormat::ASCII) |
getOrDefault streamFormat from dictionary, warn only on bad enumeration. 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) |
getOrDefault compressionType from dictionary, warn only on bad enumeration. More... | |
Static Public Attributes | |
static unsigned int | precision_ |
Default precision. More... | |
Static Public Attributes inherited from IOstreamOption | |
static const Enum< floatFormat > | floatFormatNames |
Names for float formats (general, fixed, scientific) More... | |
static const Enum< streamFormat > | formatNames |
Stream format names (ascii, binary) More... | |
static const versionNumber | currentVersion |
The current version number (2.0) More... | |
Protected Member Functions | |
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... | |
Protected Attributes | |
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 fileName | staticName_ |
Name for any generic stream - normally treat as readonly. More... | |
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.
The basic operations are construct, close, read token, read primitive and read binary block. In addition version control and line number counting is incorporated. Usually one would use the read primitive member functions, but if one were reading a stream on unknown data sequence one can read token by token, and then analyse.
Definition at line 82 of file IOstream.H.
enum streamAccess : char |
Enumeration for stream open/closed state.
Enumerator | |
---|---|
CLOSED | The stream is not open. |
OPENED | The stream is open. |
Definition at line 93 of file IOstream.H.
|
virtualdefault |
Destructor.
|
inlineexplicit |
Default construct (ASCII, uncompressed), construct with specified stream option.
Definition at line 201 of file IOstream.H.
References IOstream::setBad().
|
inline |
Construct with format, version (compression)
Definition at line 217 of file IOstream.H.
|
inlineprotectednoexcept |
Set stream opened.
Definition at line 150 of file IOstream.H.
References IOstream::openClosed_, and IOstream::OPENED.
Referenced by ITstream::ITstream(), OTstream::OTstream(), OTstream::reset(), and UOPstreamBase::UOPstreamBase().
|
inlineprotectednoexcept |
Set stream closed.
Definition at line 158 of file IOstream.H.
References IOstream::CLOSED, and IOstream::openClosed_.
|
inlineprotectednoexcept |
Set stream state.
Definition at line 166 of file IOstream.H.
References IOstream::ioState_.
Referenced by OSstream::syncState(), and ISstream::syncState().
|
inlineprotectednoexcept |
Set stream state to be good.
Definition at line 174 of file IOstream.H.
References IOstream::ioState_.
Referenced by ITstream::ITstream(), OTstream::OTstream(), OTstream::reset(), and UOPstreamBase::UOPstreamBase().
|
virtual |
The name of the stream.
Reimplemented in ITstream, primitiveEntry, ISstream, and OSstream.
Definition at line 33 of file IOstream.C.
References IOstream::staticName_.
Referenced by globalIndexAndTransform::addToTransformIndex(), mappedPatchBase::calcMapping(), hexRef8::checkMesh(), Foam::copyFilteredDict(), includeEntry::execute(), ifeqEntry::execute(), Foam::operator>>(), decomposedBlockData::readHeader(), IOobject::readHeader(), fvExpressionField::setField(), and triSurface::triSurfInstance().
Foam::fileName relativeName | ( | ) | const |
Return the name of the stream relative to the current case.
Uses argList::envRelativePath()
Definition at line 39 of file IOstream.C.
References argList::envRelativePath(), and Foam::name().
Referenced by functionEntry::execute(), Foam::operator>>(), decomposedBlockData::readBlock(), decomposedBlockData::readBlocks(), IOobject::readHeader(), primitiveEntry::relativeName(), entry::reportReadWarning(), and IOerror::SafeFatalIOError().
|
virtual |
Check IOstream status for given operation.
Print IOstream state or generate a FatalIOError when an error has occurred. The base implementation is a fatalCheck
Definition at line 45 of file IOstream.C.
Referenced by CollidingParcel< ParcelType >::CollidingParcel(), CollisionRecordList< vector, vector >::CollisionRecordList(), DSMCParcel< ParcelType >::DSMCParcel(), eddy::eddy(), findCellParticle::findCellParticle(), ignitionSite::ignitionSite(), injectedParticle::injectedParticle(), Foam::input(), KinematicParcel< ParcelType >::KinematicParcel(), kinematicParcelInjectionData::kinematicParcelInjectionData(), molecule::molecule(), MPPICParcel< ParcelType >::MPPICParcel(), objectMap::objectMap(), Foam::operator<<(), Foam::operator>>(), Foam::RBD::operator>>(), Foam::functionObjects::operator>>(), orientedType::orientedType(), Foam::output(), PairCollisionRecord< Type >::PairCollisionRecord(), ReactingHeterogeneousParcel< ParcelType >::ReactingHeterogeneousParcel(), ReactingMultiphaseParcel< ParcelType >::ReactingMultiphaseParcel(), reactingMultiphaseParcelInjectionData::reactingMultiphaseParcelInjectionData(), ReactingParcel< ParcelType >::ReactingParcel(), reactingParcelInjectionData::reactingParcelInjectionData(), SHA1Digest::read(), dimensionSet::read(), dimensioned< vector >::read(), IOPosition< CloudType >::readData(), lumpedPointIOMovement::readData(), particle< Type >::readData(), PackedList< 2 >::setPair(), solidParticle::solidParticle(), SprayParcel< ParcelType >::SprayParcel(), streamLineParticle::streamLineParticle(), ThermoParcel< ParcelType >::ThermoParcel(), thermoParcelInjectionData::thermoParcelInjectionData(), trackedParticle::trackedParticle(), Tuple2< scalar, Foam::vector >::Tuple2(), VectorSpace< Vector< vector >, vector, 3 >::VectorSpace(), wallBoundedParticle::wallBoundedParticle(), wallBoundedStreamLineParticle::wallBoundedStreamLineParticle(), WallCollisionRecord< Type >::WallCollisionRecord(), SHA1Digest::write(), dimensionSet::write(), faBoundaryMeshEntries::writeEntries(), polyBoundaryMeshEntries::writeEntries(), faBoundaryMesh::writeEntry(), polyBoundaryMesh::writeEntry(), injectedParticle::writePosition(), and particle< Type >::writePosition().
bool fatalCheck | ( | const char * | operation | ) | const |
Check IOstream status for given operation.
Generate a FatalIOError when an error has occurred.
Definition at line 51 of file IOstream.C.
References Foam::exit(), Foam::FatalIOError, and FatalIOErrorInFunction.
Referenced by dictionaryEntry::dictionaryEntry(), functionEntry::execute(), entry::New(), Foam::operator>>(), Foam::blockMeshTools::read(), primitiveEntry::read(), exprValue::read(), decomposedBlockData::readBlockEntry(), decomposedBlockData::readBlocks(), PtrList< transferModel >::readIstream(), LList< Foam::chemPointISAT< CompType, ThermoType > *>::readList(), List< Field< scalar > >::readList(), DynamicList< Foam::vector >::readList(), PackedList< 2 >::readList(), FixedList< point, 2 >::readList(), UList< Foam::vector >::readList(), Matrix< RectangularMatrix< Type >, Type >::readMatrix(), and decomposedBlockData::skipBlockEntry().
|
inlinenoexcept |
True if stream has been opened.
Definition at line 265 of file IOstream.H.
References IOstream::openClosed_, and IOstream::OPENED.
|
inlinenoexcept |
True if stream is closed.
Definition at line 273 of file IOstream.H.
References IOstream::CLOSED, and IOstream::openClosed_.
|
inlinenoexcept |
True if next operation might succeed.
Definition at line 281 of file IOstream.H.
References IOstream::ioState_.
Referenced by backwardDdtScheme< Type >::backwardDdtScheme(), topoSetSource::checkIs(), dynamicCode::copyAndFilter(), dynamicCode::copyOrCreateFiles(), dynamicCode::createMakeFiles(), dynamicCode::createMakeOptions(), AC3DsurfaceFormatCore::cueTo(), directionalPressureGradientExplicitSource::directionalPressureGradientExplicitSource(), fanMomentumSource::fanMomentumSource(), ISstream::get(), edgeMeshFormatsCore::getLineNoComment(), surfaceFormatsCore::getLineNoComment(), decomposedBlockData::getNumBlocks(), meanVelocityForce::meanVelocityForce(), writeFile::newFileAtTime(), csvTableReader< Type >::operator()(), argList::parse(), extendedEdgeMeshFormat::read(), NASedgeFormat::read(), OBJsurfaceFormat< Face >::read(), VTKedgeFormat::read(), extendedFeatureEdgeMeshFormat::read(), OBJedgeFormat::read(), edgeMeshFormat::read(), OFFsurfaceFormat< Face >::read(), STARCDsurfaceFormat< Face >::read(), AC3DsurfaceFormat< Face >::read(), ABAQUSsurfaceFormat< Face >::read(), GTSsurfaceFormat< Face >::read(), NASsurfaceFormat< Face >::read(), STARCDedgeFormat::read(), tabulated6DoFAcceleration::read(), VTKsurfaceFormat< Face >::read(), tabulated6DoFMotion::read(), ABAQUSCore::readHelper::read(), dictionary::read(), masterUncollatedFileOperation::readAndSend(), decomposedBlockData::readBlocks(), STARCDMeshReader::readBoundary(), ensightSurfaceReader::readCase(), STARCDMeshReader::readCells(), AC3DsurfaceFormatCore::readCmd(), IFstream::readContents(), IOmapDistributePolyMesh::readData(), GlobalIOField< vector >::readData(), GlobalIOList< kinematicParcelInjectionData >::readData(), UniformDimensionedField< vector >::readData(), IOmapDistributePolyMeshRef::readData(), ensightSurfaceReader::readField(), ensightSurfaceReader::readGeometry(), STARCDCore::readHeader(), masterUncollatedFileOperation::readHeader(), IOobject::readHeader(), STARCDsurfaceFormatCore::readInpCellTable(), topoSet::readIOcontents(), ensightSurfaceReader::readLine(), STARCDMeshReader::readPoints(), STARCDCore::readPoints(), noiseFFT::setData(), Reaction< ReactionThermo >::setLRhs(), decomposedBlockData::skipBlockEntry(), TableFile< Type >::TableFile(), graph::write(), decomposedBlockData::writeBlocks(), featureEdgeMesh::writeData(), surfZoneIOList::writeData(), IOmapDistributePolyMesh::writeData(), lumpedPointIOMovement::writeData(), baseIOdictionary::writeData(), IOField< Type >::writeData(), IOMap< T >::writeData(), porosityModelList::writeData(), extendedFeatureEdgeMesh::writeData(), virtualMassModel::writeData(), dragModel::writeData(), polyTopoChanger::writeData(), IOmapDistributePolyMeshRef::writeData(), decomposedBlockData::writeData(), coordinateSystems::writeData(), IOFieldRef< Type >::writeData(), MRFZoneList::writeData(), profiling::writeData(), faBoundaryMesh::writeData(), refinementHistory::writeData(), polyBoundaryMesh::writeData(), AMIInterpolation::writeData(), dynamicCode::writeDigest(), faBoundaryMeshEntries::writeEntries(), polyBoundaryMeshEntries::writeEntries(), dictionary::writeEntries(), IOobject::writeHeader(), Foam::writeJobDict(), and fileOperation::writeObject().
|
inlinenoexcept |
True if end of input seen.
Definition at line 289 of file IOstream.H.
References IOstream::ioState_.
Referenced by backwardDdtScheme< Type >::backwardDdtScheme(), topoSetSource::checkIs(), divScheme< Type >::divScheme(), ifeqEntry::evaluate(), ifeqEntry::execute(), gaussGrad< Type >::gaussGrad(), laplacianScheme< Type >::laplacianScheme(), laplacianScheme< Type, GType >::laplacianScheme(), Cloud< passivePositionParticle >::move(), lnGradScheme< Type >::New(), gradScheme< Type >::New(), edgeInterpolationScheme< scalar >::New(), convectionScheme< Type >::New(), surfaceInterpolationScheme< GType >::New(), d2dt2Scheme< Type >::New(), faDdtScheme< scalar >::New(), faD2dt2Scheme< Type >::New(), snGradScheme< Type >::New(), convectionScheme< scalar >::New(), divScheme< Type >::New(), laplacianScheme< Type >::New(), limitedSurfaceInterpolationScheme< Type >::New(), ddtScheme< Type >::New(), laplacianScheme< Type, GType >::New(), entry::New(), RecycleInteraction< CloudType >::postEvolve(), dictionary::read(), Foam::readEnsightString(), PtrList< transferModel >::readIstream(), noiseFFT::setData(), and solution::upgradeSolverDict().
|
inlinenoexcept |
True if next operation will fail.
Definition at line 297 of file IOstream.H.
References IOstream::ioState_.
Referenced by IOstream::operator bool(), and IOstream::operator!().
|
inlinenoexcept |
True if stream is corrupted.
Definition at line 305 of file IOstream.H.
References IOstream::ioState_.
Referenced by Foam::getToken(), Foam::parseStream(), GTSsurfaceFormat< Face >::read(), primitiveEntry::read(), ISstream::read(), dictionary::read(), featureEdgeMesh::readData(), fvExprDriverWriter::readData(), baseIOdictionary::readData(), extendedFeatureEdgeMesh::readData(), exprResultGlobals::readData(), refinementHistory::readData(), exprValue::readTokens(), error::write(), and IOerror::write().
|
inlineexplicitnoexcept |
Return true if the stream has not failed.
Definition at line 313 of file IOstream.H.
References IOstream::fail().
|
inlinenoexcept |
Return true if the stream has failed.
Definition at line 321 of file IOstream.H.
References IOstream::fail().
|
inlinenoexcept |
The sizeof (label) in bytes associated with the stream.
Definition at line 332 of file IOstream.H.
References IOstream::sizeofLabel_.
Referenced by decomposedBlockData::readBlock().
|
inlinenoexcept |
The sizeof (scalar) in bytes associated with the stream.
Definition at line 340 of file IOstream.H.
References IOstream::sizeofScalar_.
Referenced by decomposedBlockData::readBlock().
|
inlinenoexcept |
Set the sizeof (label) in bytes associated with the stream.
Definition at line 348 of file IOstream.H.
References IOstream::sizeofLabel_.
Referenced by ITstream::extract(), and IOobject::readHeader().
|
inlinenoexcept |
Set the sizeof (scalar) in bytes associated with the stream.
Definition at line 356 of file IOstream.H.
References IOstream::sizeofScalar_.
Referenced by ITstream::extract(), and IOobject::readHeader().
Check if the label byte-size associated with the stream is the same as the given type.
Definition at line 368 of file IOstream.H.
References IOstream::sizeofLabel_, and Foam::T().
Referenced by CollidingParcel< ParcelType >::CollidingParcel(), DSMCParcel< ParcelType >::DSMCParcel(), findCellParticle::findCellParticle(), injectedParticle::injectedParticle(), KinematicParcel< ParcelType >::KinematicParcel(), molecule::molecule(), MPPICParcel< ParcelType >::MPPICParcel(), Foam::operator>>(), ReactingParcel< ParcelType >::ReactingParcel(), particle< Type >::readData(), Foam::readRawLabel(), solidParticle::solidParticle(), SprayParcel< ParcelType >::SprayParcel(), ThermoParcel< ParcelType >::ThermoParcel(), trackedParticle::trackedParticle(), and wallBoundedParticle::wallBoundedParticle().
|
inlinenoexcept |
Check if the scalar byte-size associated with the stream is the same as the given type.
Definition at line 379 of file IOstream.H.
References IOstream::sizeofScalar_, and Foam::T().
Referenced by CollidingParcel< ParcelType >::CollidingParcel(), DSMCParcel< ParcelType >::DSMCParcel(), findCellParticle::findCellParticle(), injectedParticle::injectedParticle(), KinematicParcel< ParcelType >::KinematicParcel(), molecule::molecule(), MPPICParcel< ParcelType >::MPPICParcel(), Foam::operator>>(), ReactingParcel< ParcelType >::ReactingParcel(), particle< Type >::readData(), solidParticle::solidParticle(), SprayParcel< ParcelType >::SprayParcel(), ThermoParcel< ParcelType >::ThermoParcel(), trackedParticle::trackedParticle(), and wallBoundedParticle::wallBoundedParticle().
|
inlinenoexcept |
Const access to the current stream line number.
Definition at line 390 of file IOstream.H.
References IOstream::lineNumber_.
Referenced by entry::checkITstream(), dictionary::checkITstream(), ITstream::endLineNumber(), codeStream::evaluate(), ifeqEntry::execute(), functionEntry::execute(), ensightReadFile::getTimeStepFooter(), NASedgeFormat::read(), NASsurfaceFormat< Face >::read(), IOobject::readHeader(), functionEntry::readLine(), entry::reportReadWarning(), IOerror::SafeFatalIOError(), and ITstream::startLineNumber().
|
inlinenoexcept |
Non-const access to the current stream line number.
Definition at line 398 of file IOstream.H.
References IOstream::lineNumber_.
|
inlinenoexcept |
Set the stream line number.
Definition at line 408 of file IOstream.H.
References IOstream::lineNumber_.
|
inlinestaticnoexcept |
Return the default precision.
Definition at line 418 of file IOstream.H.
References IOstream::precision_.
Referenced by objectiveManager::objectiveManager(), dataCloud::read(), writeFile::read(), vtkCloud::read(), vtkWrite::read(), Time::readDict(), AMIWeights::reportPatch(), faceSetOption::setArea(), cellSetOption::setVol(), PDRblock::writeBlockMeshDict(), designVariablesUpdate::writeCPUcostHeader(), objective::writeInstantaneousValue(), SQPBase::writeMeritFunction(), objectiveManager::writeObjectives(), shapeDesignVariables::writeSensitivities(), designVariablesUpdate::writeToCostFile(), and GCMMA::writeToFiles().
|
inlinestaticnoexcept |
Reset the default precision.
Definition at line 428 of file IOstream.H.
References IOstream::precision_.
|
inlinestaticnoexcept |
Set the minimum default precision.
Definition at line 440 of file IOstream.H.
References IOstream::precision_.
Referenced by faMeshDecomposition::writeDecomposition().
|
inlinenoexcept |
Set stream state as reached 'eof'.
Definition at line 453 of file IOstream.H.
References IOstream::ioState_.
|
inlinenoexcept |
Set stream state as 'failed'.
Definition at line 461 of file IOstream.H.
References IOstream::ioState_.
|
inlinenoexcept |
Set stream state to be 'bad'.
Definition at line 469 of file IOstream.H.
References IOstream::ioState_.
Referenced by IOstream::IOstream(), and Foam::operator>>().
|
pure virtual |
Return current stream flags.
Implemented in ITstream, OTstream, UIPstreamBase, UOPstreamBase, ISstream, OSstream, and dummyISstream.
Referenced by IOstream::setf(), and IOstream::unsetf().
|
pure virtual |
Set stream flags, return old stream flags.
Implemented in ITstream, OTstream, UIPstreamBase, UOPstreamBase, ISstream, OSstream, and dummyISstream.
|
inline |
Set stream flag(s), return old stream flags.
Definition at line 487 of file IOstream.H.
References f(), and IOstream::flags().
Referenced by Foam::putType< scalar >(), Foam::setf(), ensightCase::setTimeFormat(), and objective::write().
|
inline |
Set stream flag(s) with mask, return old stream flags.
Definition at line 496 of file IOstream.H.
References f(), and IOstream::flags().
|
inline |
Unset flags of stream.
Definition at line 507 of file IOstream.H.
References f(), and IOstream::flags().
|
virtual |
Print stream description to Ostream.
Reimplemented in ITstream, ISpanStream, ICharStream, OSpanStream, OCharStream, UOPstreamBase, OSstream, ISstream, OTstream, OStringStream, UIPstreamBase, OCountStream, OFstream, prefixOSstream, IFstream, and IStringStream.
Definition at line 67 of file IOstream.C.
References Foam::endl(), format(), os(), and Foam::foamVersion::version.
Referenced by OTstream::print(), ISstream::print(), OSstream::print(), ITstream::print(), and HashTable< T, Key, Hash >::Iterator< true >::print().
void print | ( | Ostream & | os, |
const int | streamState | ||
) | const |
Print information about the stream state bits.
Definition at line 106 of file IOstream.C.
References Foam::endl(), and os().
Return info proxy, used to print IOstream information to a stream.
Definition at line 532 of file IOstream.H.
Referenced by MultiInteraction< CloudType >::info(), dimensionSet::read(), and IOobject::writeHeader().
|
static |
Default precision.
Definition at line 105 of file IOstream.H.
Referenced by IOstream::defaultPrecision(), functionObjectList::execute(), and IOstream::minPrecision().
|
staticprotected |
Name for any generic stream - normally treat as readonly.
Definition at line 115 of file IOstream.H.
Referenced by IOstream::name().
|
protected |
Mirror of internal stream io state.
Definition at line 120 of file IOstream.H.
Referenced by IOstream::bad(), IOstream::eof(), IOstream::fail(), IOstream::good(), IOstream::setBad(), IOstream::setEof(), IOstream::setFail(), IOstream::setGood(), and IOstream::setState().
|
protected |
The stream open/closed state.
Definition at line 125 of file IOstream.H.
Referenced by IOstream::closed(), IOstream::opened(), IOstream::setClosed(), and IOstream::setOpened().
|
protected |
The sizeof (label), possibly read from the header.
Definition at line 130 of file IOstream.H.
Referenced by IOstream::checkLabelSize(), IOstream::labelByteSize(), and IOstream::setLabelByteSize().
|
protected |
The sizeof (scalar), possibly read from the header.
Definition at line 135 of file IOstream.H.
Referenced by IOstream::checkScalarSize(), IOstream::scalarByteSize(), and IOstream::setScalarByteSize().
|
protected |
The file line.
Definition at line 140 of file IOstream.H.
Referenced by ISstream::get(), and IOstream::lineNumber().