An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc. More...
#include <IOstream.H>


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 , COHERENT , UNKNOWN_FORMAT } |
| Data format (ascii | binary | coherent). 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 class | 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. | |
| virtual | ~IOstream ()=default |
| Destructor. | |
| IOstream (IOstreamOption streamOpt=IOstreamOption()) | |
| Default construct (ASCII, uncompressed), construct with specified stream option. | |
| IOstream (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED) | |
| Construct with format, version (compression). | |
| virtual const fileName & | name () const |
| The name of the stream. | |
| fileName | relativeName () const |
| Return the name of the stream relative to the current case. | |
| virtual bool | check (const char *operation) const |
| Check IOstream status for given operation. | |
| bool | fatalCheck (const char *operation) const |
| Check IOstream status for given operation. | |
| bool | opened () const noexcept |
| True if stream has been opened. | |
| bool | closed () const noexcept |
| True if stream is closed. | |
| bool | good () const noexcept |
| True if next operation might succeed. | |
| bool | eof () const noexcept |
| True if end of input seen. | |
| bool | fail () const noexcept |
| True if next operation will fail. | |
| bool | bad () const noexcept |
| True if stream is corrupted. | |
| operator bool () const noexcept | |
| True if the stream has not failed. | |
| bool | operator! () const noexcept |
| True if the stream has failed. | |
| unsigned | labelByteSize () const noexcept |
| The sizeof (label) in bytes associated with the stream. | |
| unsigned | scalarByteSize () const noexcept |
| The sizeof (scalar) in bytes associated with the stream. | |
| void | setLabelByteSize (unsigned nbytes) noexcept |
| Set the sizeof (label) in bytes associated with the stream. | |
| void | setScalarByteSize (unsigned nbytes) noexcept |
| Set the sizeof (scalar) in bytes associated with the stream. | |
| template<class T, class = std::enable_if_t<std::is_integral_v<T>>> | |
| bool | checkLabelSize () const noexcept |
| Test if the label byte-size associated with the stream is the same as the given type. | |
| template<class T, class = std::enable_if_t<std::is_floating_point_v<T>>> | |
| bool | checkScalarSize () const noexcept |
| Test if the scalar byte-size associated with the stream is the same as the given type. | |
| bool | checkNativeSizes () const noexcept |
| Test if the label/scalar byte-size associated with the stream are the native label/scalar sizes. | |
| bool | fatalCheckNativeSizes (const char *operation) const |
| Assert that the label/scalar byte-size associated with the stream are the native label/scalar sizes. | |
| label | lineNumber () const noexcept |
| Const access to the current stream line number. | |
| label & | lineNumber () noexcept |
| Non-const access to the current stream line number. | |
| label | lineNumber (const label num) noexcept |
| Set the stream line number. | |
| void | setEof () noexcept |
| Set stream state as reached 'eof'. | |
| void | setFail () noexcept |
| Set stream state as 'failed'. | |
| void | setBad () noexcept |
| Set stream state to be 'bad'. | |
| virtual std::ios_base::fmtflags | flags () const =0 |
| Return current stream flags. | |
| virtual std::ios_base::fmtflags | flags (std::ios_base::fmtflags)=0 |
| Set stream flags, return old stream flags. | |
| std::ios_base::fmtflags | setf (std::ios_base::fmtflags f) |
| Set stream flag(s), return old stream flags. | |
| 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. | |
| std::ios_base::fmtflags | unsetf (std::ios_base::fmtflags f) |
| Unset stream flags, return old stream flags. | |
| virtual void | print (Ostream &os) const |
| Print stream description to Ostream. | |
| void | print (Ostream &os, const int streamState) const |
| Print information about the stream state bits. | |
| InfoProxy< IOstream > | info () const noexcept |
| Return info proxy, used to print IOstream information to a stream. | |
| 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. | |
| constexpr | IOstreamOption (streamFormat fmt, compressionType comp, versionNumber ver) noexcept |
| Construct from components (format, compression, version). | |
| constexpr | IOstreamOption (streamFormat fmt, versionNumber ver, compressionType comp=compressionType::UNCOMPRESSED) noexcept |
| Construct from components (format, version, compression). | |
| IOstreamOption (const IOstreamOption &opt, streamFormat fmt) noexcept | |
| Copy construct with change of format. | |
| streamFormat | format () const noexcept |
| Get the current stream format. | |
| streamFormat | format (const streamFormat fmt) noexcept |
| Set the stream format. | |
| streamFormat | format (const word &formatName) |
| Set the stream format from string value. | |
| compressionType | compression () const noexcept |
| Get the stream compression. | |
| compressionType | compression (const compressionType comp) noexcept |
| Set the stream compression. | |
| compressionType | compression (const word &compName) |
| Set the stream compression from string value. | |
| versionNumber | version () const noexcept |
| Get the stream version. | |
| versionNumber | version (const versionNumber ver) noexcept |
| Set the stream version. | |
| versionNumber | version (const token &tok) |
| Set the stream version from token. | |
Static Public Member Functions | |
| static unsigned int | defaultPrecision () noexcept |
| Return the default precision. | |
| static unsigned int | defaultPrecision (unsigned int prec) noexcept |
| Reset the default precision. | |
| static unsigned int | minPrecision (unsigned int prec) noexcept |
| Set the minimum default precision. | |
| 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). | |
| static floatFormat | floatFormatEnum (const word &key, const dictionary &dict, const floatFormat deflt=floatFormat::general) |
| getOrDefault floatFormat from dictionary, warn only on bad enumeration. | |
| static streamFormat | formatEnum (const word &fmtName, const streamFormat deflt=streamFormat::ASCII) |
| Lookup streamFormat enum corresponding to the string (ascii | binary). | |
| static streamFormat | formatEnum (const word &key, const dictionary &dict, const streamFormat deflt=streamFormat::ASCII) |
| getOrDefault streamFormat from dictionary, warn only on bad enumeration. | |
| static compressionType | compressionEnum (const word &compName, const compressionType deflt=compressionType::UNCOMPRESSED) |
| The compression enum corresponding to the string. | |
| static compressionType | compressionEnum (const word &key, const dictionary &dict, const compressionType deflt=compressionType::UNCOMPRESSED) |
| getOrDefault compressionType from dictionary, warn only on bad enumeration. | |
Static Public Attributes | |
| static unsigned int | precision_ |
| Default precision. | |
| Static Public Attributes inherited from IOstreamOption | |
| static const Enum< floatFormat > | floatFormatNames |
| Names for float formats (general, fixed, scientific). | |
| static const Enum< streamFormat > | formatNames |
| Stream format names (ascii, binary). | |
| static const versionNumber | currentVersion |
| The current version number (2.0). | |
Protected Member Functions | |
| void | setOpened () noexcept |
| Set stream opened. | |
| void | setClosed () noexcept |
| Set stream closed. | |
| void | setState (std::ios_base::iostate state) noexcept |
| Set stream state. | |
| void | setGood () noexcept |
| Set stream state to be good. | |
Protected Attributes | |
| std::ios_base::iostate | ioState_ |
| Mirror of internal stream io state. | |
| streamAccess | openClosed_ |
| The stream open/closed state. | |
| unsigned char | sizeofLabel_ |
| The sizeof (label), possibly read from the header. | |
| unsigned char | sizeofScalar_ |
| The sizeof (scalar), possibly read from the header. | |
| label | lineNumber_ |
| The file line. | |
Static Protected Attributes | |
| static fileName | staticName_ |
| Name for any generic stream - normally treat as readonly. | |
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.
|
default |
Copy construct.
References IOstream().
Referenced by IOstream(), IOstream(), Istream::Istream(), and Ostream::Ostream().


|
virtualdefault |
Destructor.
|
inlineexplicit |
Default construct (ASCII, uncompressed), construct with specified stream option.
Definition at line 201 of file IOstream.H.
References CLOSED, ioState_, IOstreamOption::IOstreamOption(), lineNumber_, openClosed_, setBad(), sizeofLabel_, and sizeofScalar_.

|
inline |
Construct with format, version (compression).
Definition at line 216 of file IOstream.H.
References IOstream(), IOstreamOption::IOstreamOption(), and IOstreamOption::UNCOMPRESSED.

|
inlineprotectednoexcept |
Set stream opened.
Definition at line 150 of file IOstream.H.
References Foam::noexcept, openClosed_, and OPENED.
Referenced by IFstream::IFstream(), ITstream::ITstream(), ITstream::ITstream(), ITstream::ITstream(), ITstream::ITstream(), ITstream::ITstream(), OFstream::OFstream(), OFstream::OFstream(), OTstream::OTstream(), OTstream::OTstream(), OTstream::OTstream(), UIPstream::read(), OTstream::reset(), OFstream::rewind(), UIPstreamBase::rewind(), UOPstreamBase::rewind(), ITstream::seek(), ITstream::skip(), UIPstreamBase::UIPstreamBase(), UIPstreamBase::UIPstreamBase(), UOPstreamBase::UOPstreamBase(), UOPstreamBase::UOPstreamBase(), and UOPstreamBase::UOPstreamBase().

|
inlineprotectednoexcept |
Set stream closed.
Definition at line 158 of file IOstream.H.
References CLOSED, Foam::noexcept, and openClosed_.
Referenced by IFstream::IFstream(), OFstream::OFstream(), and OFstream::rewind().

|
inlineprotectednoexcept |
Set stream state.
Definition at line 166 of file IOstream.H.
References ioState_.
Referenced by IFstream::IFstream(), OFstream::OFstream(), OFstream::OFstream(), IFstream::rewind(), OFstream::rewind(), ISstream::syncState(), and OSstream::syncState().

|
inlineprotectednoexcept |
Set stream state to be good.
Definition at line 174 of file IOstream.H.
References ioState_, and Foam::noexcept.
Referenced by ITstream::ITstream(), ITstream::ITstream(), ITstream::ITstream(), ITstream::ITstream(), ITstream::ITstream(), OTstream::OTstream(), OTstream::OTstream(), OTstream::OTstream(), UIPstream::read(), OTstream::reset(), ISstream::rewind(), UIPstreamBase::rewind(), UOPstreamBase::rewind(), ITstream::seek(), ITstream::skip(), UIPstreamBase::UIPstreamBase(), UOPstreamBase::UOPstreamBase(), UOPstreamBase::UOPstreamBase(), and UOPstreamBase::UOPstreamBase().

|
virtual |
The name of the stream.
Reimplemented in IFstream, ISstream, ITstream, OFstream, OSstream, and primitiveEntry.
Definition at line 33 of file IOstream.C.
References staticName_.
Referenced by ifeqEntry::execute(), ifeqEntry::execute(), includeEntry::execute(), includeEntry::execute(), Foam::operator>>(), decomposedBlockData::readHeader(), and IOobject::readHeader().

| 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 name.
Referenced by functionEntry::execute(), functionEntry::execute(), fatalCheck(), fatalCheckNativeSizes(), Foam::operator>>(), decomposedBlockData::readBlock(), 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.
References fatalCheck().
Referenced by CollidingParcel< ParcelType >::CollidingParcel(), CollisionRecordList< PairType, WallType >::CollisionRecordList(), DSMCParcel< ParcelType >::DSMCParcel(), eddy::eddy(), findCellParticle::findCellParticle(), ignitionSite::ignitionSite(), ignitionSite::ignitionSite(), injectedParticle::injectedParticle(), KinematicParcel< ParcelType >::KinematicParcel(), kinematicParcelInjectionData::kinematicParcelInjectionData(), molecule::molecule(), MPPICParcel< ParcelType >::MPPICParcel(), objectMap::objectMap(), magnet::operator>>, Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), PointIndexHit< point >::operator>>, orientedType::orientedType(), PairCollisionRecord< Type >::PairCollisionRecord(), pointBoundaryMesh::pointBoundaryMesh(), ReactingHeterogeneousParcel< ParcelType >::ReactingHeterogeneousParcel(), ReactingMultiphaseParcel< ParcelType >::ReactingMultiphaseParcel(), reactingMultiphaseParcelInjectionData::reactingMultiphaseParcelInjectionData(), ReactingParcel< ParcelType >::ReactingParcel(), reactingParcelInjectionData::reactingParcelInjectionData(), dimensioned< Type >::read(), dimensioned< Type >::read(), dimensioned< Type >::read(), dimensionSet::read(), dimensionSet::read(), SHA1Digest::read(), IOPosition< CloudType >::readData(), lumpedPointIOMovement::readData(), particle< Type >::readData(), PackedList< Width >::setPair(), solidParticle::solidParticle(), SprayParcel< ParcelType >::SprayParcel(), streamLineParticle::streamLineParticle(), ThermoParcel< ParcelType >::ThermoParcel(), thermoParcelInjectionData::thermoParcelInjectionData(), trackedParticle::trackedParticle(), Tuple2< scalar, vector >::Tuple2(), wallBoundedParticle::wallBoundedParticle(), wallBoundedStreamLineParticle::wallBoundedStreamLineParticle(), and WallCollisionRecord< Type >::WallCollisionRecord().

| 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 bad(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and relativeName().
Referenced by check(), dictionaryEntry::dictionaryEntry(), dictionaryEntry::dictionaryEntry(), functionEntry::execute(), functionEntry::execute(), entry::New(), entry::New(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::blockMeshTools::read(), Foam::blockMeshTools::read(), exprValue::read(), primitiveEntry::read(), decomposedBlockData::readBlockEntry(), PtrList< T >::readIstream(), DynamicList< T, SizeMin >::readList(), FixedList< T, N >::readList(), List< T >::readList(), LList< LListBase, T >::readList(), PackedList< Width >::readList(), UList< T >::readList(), bitSet::readListToc(), Matrix< Form, Type >::readMatrix(), and decomposedBlockData::skipBlockEntry().


|
inlinenoexcept |
True if stream has been opened.
Definition at line 265 of file IOstream.H.
References Foam::noexcept, openClosed_, and OPENED.
Referenced by IFstream::IFstream(), OFstream::OFstream(), and print().

|
inlinenoexcept |
True if stream is closed.
Definition at line 273 of file IOstream.H.
References CLOSED, Foam::noexcept, and openClosed_.
Referenced by print().

|
inlinenoexcept |
True if next operation might succeed.
Definition at line 281 of file IOstream.H.
References ioState_, and Foam::noexcept.
Referenced by abaqusMeshSet::abaqusMeshSet(), dictionaryValue::apply(), fileRegEx::apply(), backwardDdtScheme< Type >::backwardDdtScheme(), topoSetSource::checkIs(), Foam::debug::controlDict(), dynamicCode::copyAndFilter(), dynamicCode::copyOrCreateFiles(), AC3DsurfaceFormatCore::cueTo(), directionalPressureGradientExplicitSource::directionalPressureGradientExplicitSource(), fanMomentumSource::fanMomentumSource(), ISstream::get(), edgeMeshFormatsCore::getLineNoComment(), surfaceFormatsCore::getLineNoComment(), decomposedBlockData::getNumBlocks(), IFstream::IFstream(), writeFile::newFileAtTime(), OFstream::OFstream(), csvTableReader< Type >::operator()(), IFstream::operator()(), Istream::operator()(), foamReport::parseTemplate(), print(), dictionary::read(), ABAQUSCore::readHelper::read(), ABAQUSsurfaceFormat< Face >::read(), AC3DsurfaceFormat< Face >::read(), edgeMeshFormat::read(), extendedEdgeMeshFormat::read(), extendedFeatureEdgeMeshFormat::read(), GTSsurfaceFormat< Face >::read(), NASedgeFormat::read(), NASsurfaceFormat< Face >::read(), OBJedgeFormat::read(), OBJsurfaceFormat< Face >::read(), OFFsurfaceFormat< Face >::read(), STARCDedgeFormat::read(), STARCDsurfaceFormat< Face >::read(), VTKedgeFormat::read(), VTKsurfaceFormat< Face >::read(), tabulated6DoFMotion::read(), tabulated6DoFAcceleration::read(), token::read(), masterUncollatedFileOperation::readAndSend(), STARCDMeshReader::readBoundary(), ensightSurfaceReader::readCase(), STARCDMeshReader::readCells(), AC3DsurfaceFormatCore::readCmd(), IFstream::readContents(), GlobalIOField< Type >::readData(), GlobalIOList< Type >::readData(), IOmapDistributePolyMesh::readData(), IOmapDistributePolyMeshRef::readData(), UniformDimensionedField< Type >::readData(), ensightSurfaceReader::readGeometry(), STARCDCore::readHeader(), masterUncollatedFileOperation::readHeader(), IOobject::readHeader(), STARCDsurfaceFormatCore::readInpCellTable(), topoSet::readIOcontents(), ensightSurfaceReader::readLine(), STARCDCore::readPoints(), STARCDMeshReader::readPoints(), OFstream::rewind(), noiseFFT::setData(), Reaction< ReactionThermo >::setLRhs(), decomposedBlockData::skipBlockEntry(), TableFile< Type >::TableFile(), and graph::write().
|
inlinenoexcept |
True if end of input seen.
Definition at line 289 of file IOstream.H.
References ioState_, and Foam::noexcept.
Referenced by Cloud< ParcelType >::autoMap(), backwardDdtScheme< Type >::backwardDdtScheme(), topoSetSource::checkIs(), divScheme< Type >::divScheme(), divScheme< Type >::divScheme(), ifeqEntry::evaluate(), ifeqEntry::execute(), fusedGaussGrad< Type >::fusedGaussGrad(), gaussGrad< Type >::gaussGrad(), gaussGrad< Type >::gaussGrad(), laplacianScheme< Type >::laplacianScheme(), laplacianScheme< scalar, scalar >::laplacianScheme(), edgeInterpolationScheme< Type >::New(), edgeInterpolationScheme< Type >::New(), entry::New(), convectionScheme< Type >::New(), divScheme< Type >::New(), faD2dt2Scheme< Type >::New(), faDdtScheme< Type >::New(), gradScheme< Type >::New(), laplacianScheme< Type >::New(), lnGradScheme< Type >::New(), convectionScheme< Type >::New(), convectionScheme< Type >::New(), d2dt2Scheme< Type >::New(), ddtScheme< Type >::New(), divScheme< Type >::New(), gradScheme< Type >::New(), laplacianScheme< Type, GType >::New(), snGradScheme< Type >::New(), limitedSurfaceInterpolationScheme< Type >::New(), limitedSurfaceInterpolationScheme< Type >::New(), surfaceInterpolationScheme< Type >::New(), surfaceInterpolationScheme< Type >::New(), RecycleInteraction< CloudType >::postEvolve(), print(), dictionary::read(), ITstream::read(), UIPstream::read(), Foam::readEnsightString(), noiseFFT::setData(), and solution::upgradeSolverDict().

|
inlinenoexcept |
True if next operation will fail.
Definition at line 297 of file IOstream.H.
References ioState_, and Foam::noexcept.
Referenced by operator bool(), operator!(), and print().

|
inlinenoexcept |
True if stream is corrupted.
Definition at line 305 of file IOstream.H.
References ioState_, and Foam::noexcept.
Referenced by fatalCheck(), Istream::getBack(), Foam::parseStream(), print(), Istream::putBack(), Istream::putBack(), dictionary::read(), GTSsurfaceFormat< Face >::read(), ISstream::read(), ISstream::read(), primitiveEntry::read(), baseIOdictionary::readData(), exprResultGlobals::readData(), fvExprDriverWriter::readData(), extendedFeatureEdgeMesh::readData(), featureEdgeMesh::readData(), refinementHistory::readData(), and exprValue::readTokens().

|
inlineexplicitnoexcept |
True if the stream has not failed.
Definition at line 313 of file IOstream.H.
References fail(), and Foam::noexcept.

|
inlinenoexcept |
True if the stream has failed.
Definition at line 321 of file IOstream.H.
References fail(), and Foam::noexcept.

|
inlinenoexcept |
The sizeof (label) in bytes associated with the stream.
Definition at line 332 of file IOstream.H.
References Foam::noexcept, and sizeofLabel_.
Referenced by ITstream::extract(), fatalCheckNativeSizes(), Foam::Detail::readContiguous< Foam::pointConstraint >(), decomposedBlockData::readBlock(), and Foam::readRawLabel().

|
inlinenoexcept |
The sizeof (scalar) in bytes associated with the stream.
Definition at line 340 of file IOstream.H.
References Foam::noexcept, and sizeofScalar_.
Referenced by ITstream::extract(), fatalCheckNativeSizes(), Foam::Detail::readContiguous< Foam::pointConstraint >(), and decomposedBlockData::readBlock().

|
inlinenoexcept |
Set the sizeof (label) in bytes associated with the stream.
Definition at line 348 of file IOstream.H.
References 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 sizeofScalar_.
Referenced by ITstream::extract(), and IOobject::readHeader().

|
inlinenoexcept |
Test if the label byte-size associated with the stream is the same as the given type.
Definition at line 367 of file IOstream.H.
References Foam::noexcept, sizeofLabel_, and Foam::T().

|
inlinenoexcept |
Test if the scalar byte-size associated with the stream is the same as the given type.
Definition at line 377 of file IOstream.H.
References Foam::noexcept, sizeofScalar_, and Foam::T().

|
inlinenoexcept |
Test if the label/scalar byte-size associated with the stream are the native label/scalar sizes.
Definition at line 386 of file IOstream.H.
References Foam::noexcept, sizeofLabel_, and sizeofScalar_.
Referenced by fatalCheckNativeSizes(), and Foam::Detail::readContiguous< Foam::pointConstraint >().

| bool fatalCheckNativeSizes | ( | const char * | operation | ) | const |
Assert that the label/scalar byte-size associated with the stream are the native label/scalar sizes.
Generate a FatalIOError for any mismatch.
Definition at line 67 of file IOstream.C.
References checkNativeSizes(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, labelByteSize(), Foam::nl, relativeName(), and scalarByteSize().
Referenced by CollidingParcel< ParcelType >::CollidingParcel(), DSMCParcel< ParcelType >::DSMCParcel(), findCellParticle::findCellParticle(), Foam::Detail::readContiguous< Foam::pointConstraint >(), injectedParticle::injectedParticle(), KinematicParcel< ParcelType >::KinematicParcel(), molecule::molecule(), MPPICParcel< ParcelType >::MPPICParcel(), 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 409 of file IOstream.H.
References lineNumber_, and Foam::noexcept.
Referenced by dictionary::checkITstream(), entry::checkITstream(), ITstream::endLineNumber(), codeStream::evaluate(), ifeqEntry::execute(), ifeqEntry::execute(), functionEntry::execute(), functionEntry::execute(), functionEntry::functionEntry(), ensightReadFile::getTimeStepFooter(), print(), ITstream::print(), NASedgeFormat::read(), NASsurfaceFormat< Face >::read(), ISstream::read(), ITstream::read(), UIPstreamBase::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 417 of file IOstream.H.
References lineNumber_, and Foam::noexcept.
|
inlinenoexcept |
Set the stream line number.
Definition at line 427 of file IOstream.H.
References lineNumber_.
|
inlinestaticnoexcept |
Return the default precision.
Definition at line 437 of file IOstream.H.
References Foam::noexcept, and precision_.
Referenced by VTKsurfaceFormatCore::formatOptions(), VTPsurfaceFormatCore::formatOptions(), Foam::vtk::newFormatter(), Foam::vtk::newFormatter(), objectiveManager::objectiveManager(), outputOptions::outputOptions(), dataCloud::read(), writeFile::read(), Time::readDict(), AMIWeights::reportPatch(), faceSetOption::setArea(), cellSetOption::setVol(), VTKedgeFormat::write(), PDRblock::writeBlockMeshDict(), designVariablesUpdate::writeCPUcostHeader(), morphingBoxConstraint::writeDVSensitivities(), objective::writeInstantaneousValue(), SQPBase::writeMeritFunction(), objectiveManager::writeObjectives(), shapeDesignVariables::writeSensitivities(), designVariablesUpdate::writeToCostFile(), and GCMMA::writeToFiles().

|
inlinestaticnoexcept |
Reset the default precision.
Definition at line 447 of file IOstream.H.
References precision_.
|
inlinestaticnoexcept |
Set the minimum default precision.
Definition at line 459 of file IOstream.H.
References precision_.
|
inlinenoexcept |
Set stream state as reached 'eof'.
Definition at line 472 of file IOstream.H.
References ioState_, and Foam::noexcept.
Referenced by ITstream::read(), primitiveEntry::read(), UIPstreamBase::rewind(), ITstream::seek(), and ITstream::skip().

|
inlinenoexcept |
Set stream state as 'failed'.
Definition at line 480 of file IOstream.H.
References ioState_, and Foam::noexcept.
|
inlinenoexcept |
Set stream state to be 'bad'.
Definition at line 488 of file IOstream.H.
References ioState_, and Foam::noexcept.
Referenced by ITstream::empty_stream(), IFstream::IFstream(), IOstream(), OFstream::OFstream(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), Foam::operator>>(), ISstream::putback(), ITstream::read(), UIPstreamBase::read(), Istream::readBegin(), Istream::readBeginList(), Istream::readEnd(), Istream::readEndList(), and OFstream::rewind().

|
pure virtual |
Return current stream flags.
Implemented in dummyISstream, ISstream, ITstream, OSstream, OTstream, UIPstreamBase, and UOPstreamBase.
Referenced by setf(), setf(), and unsetf().

|
pure virtual |
Set stream flags, return old stream flags.
Implemented in dummyISstream, ISstream, ITstream, OSstream, OTstream, UIPstreamBase, and UOPstreamBase.
|
inline |
Set stream flag(s), return old stream flags.
Definition at line 506 of file IOstream.H.
Referenced by Foam::setf(), and objective::write().


|
inline |
Set stream flag(s) with mask, return old stream flags.
Definition at line 514 of file IOstream.H.

|
inline |
Unset stream flags, return old stream flags.
Definition at line 526 of file IOstream.H.

|
virtual |
Print stream description to Ostream.
Reimplemented in ICharStream, IFstream, ISpanStream, ISstream, IStringStream, ITstream, OCharStream, OCountStream, OFstream, OSpanStream, OSstream, OStringStream, OTstream, prefixOSstream, UIPstreamBase, and UOPstreamBase.
Definition at line 87 of file IOstream.C.
References bad(), closed(), Foam::endl(), eof(), fail(), format(), good(), lineNumber(), opened(), os(), and IOstreamOption::version().
Referenced by ISstream::print(), IStringStream::print(), ITstream::print(), OSstream::print(), OStringStream::print(), and OTstream::print().


| void print | ( | Ostream & | os, |
| const int | streamState ) const |
Print information about the stream state bits.
Definition at line 126 of file IOstream.C.
References Foam::endl(), and os().

Return info proxy, used to print IOstream information to a stream.
Definition at line 551 of file IOstream.H.
References Foam::noexcept.
Referenced by IFstream::IFstream(), OFstream::OFstream(), dimensionSet::read(), and dimensionSet::read().

|
static |
Default precision.
Definition at line 105 of file IOstream.H.
Referenced by defaultPrecision(), defaultPrecision(), functionObjectList::execute(), and minPrecision().
|
staticprotected |
Name for any generic stream - normally treat as readonly.
Definition at line 115 of file IOstream.H.
Referenced by name().
|
protected |
Mirror of internal stream io state.
Definition at line 120 of file IOstream.H.
Referenced by bad(), eof(), fail(), good(), IOstream(), setBad(), setEof(), setFail(), setGood(), and setState().
|
protected |
The stream open/closed state.
Definition at line 125 of file IOstream.H.
Referenced by closed(), IOstream(), opened(), setClosed(), and setOpened().
|
protected |
The sizeof (label), possibly read from the header.
Definition at line 130 of file IOstream.H.
Referenced by checkLabelSize(), checkNativeSizes(), IOstream(), labelByteSize(), and setLabelByteSize().
|
protected |
The sizeof (scalar), possibly read from the header.
Definition at line 135 of file IOstream.H.
Referenced by checkNativeSizes(), checkScalarSize(), IOstream(), scalarByteSize(), and setScalarByteSize().
|
protected |
The file line.
Definition at line 140 of file IOstream.H.
Referenced by ISstream::get(), ISstream::getLine(), ISstream::getLine(), IFstream::IFstream(), IOstream(), lineNumber(), lineNumber(), lineNumber(), OFstream::OFstream(), OFstream::OFstream(), ISstream::putback(), ITstream::read(), IFstream::rewind(), ISstream::rewind(), OFstream::rewind(), ITstream::seek(), ITstream::skip(), OSstream::write(), OSstream::write(), and OSstream::writeQuoted().