IOstream Class Referenceabstract

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

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

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...
 

Public Member Functions

 IOstream (const IOstream &)=default
 Copy construct. More...
 
virtual ~IOstream ()=default
 Destructor. More...
 
 IOstream (IOstreamOption streamOpt=IOstreamOption())
 
 IOstream (streamFormat fmt, versionNumber ver, compressionType comp=compressionType::UNCOMPRESSED)
 Construct with format, version (compression) More...
 
virtual const fileNamename () const
 Return the name of the stream. More...
 
virtual fileNamename ()
 Return non-const access to the name of the stream. More...
 
virtual bool check (const char *operation) const
 Check IOstream status for given operation. More...
 
bool fatalCheck (const char *operation) const
 Check IOstream status for given operation. More...
 
bool opened () const
 Return true if stream has been opened. More...
 
bool closed () const
 Return true if stream is closed. More...
 
bool good () const
 Return true if next operation might succeed. More...
 
bool eof () const
 Return true if end of input seen. More...
 
bool fail () const
 Return true if next operation will fail. More...
 
bool bad () const
 Return true if stream is corrupted. More...
 
 operator bool () const
 Return true if the stream has not failed. More...
 
bool operator! () const
 Return true if the stream has failed. More...
 
unsigned labelByteSize () const
 The label byte-size associated with the stream. More...
 
unsigned scalarByteSize () const
 The scalar byte-size associated with the stream. More...
 
void setLabelByteSize (unsigned nbytes)
 Set the label byte-size associated with the stream. More...
 
void setScalarByteSize (unsigned nbytes)
 Set the scalar byte-size associated with the stream. More...
 
template<class T = label>
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize () const
 
template<class T = scalar>
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize () const
 
label lineNumber () const
 Const access to the current stream line number. More...
 
label & lineNumber ()
 Non-const access to the current stream line number. More...
 
label lineNumber (const label num)
 Set the stream line number. More...
 
virtual ios_base::fmtflags flags () const =0
 Return flags of stream. More...
 
void setEof ()
 Set stream to have reached eof. More...
 
void setFail ()
 Set stream to have failed. More...
 
void setBad ()
 Set stream to be bad. More...
 
virtual ios_base::fmtflags flags (const ios_base::fmtflags f)=0
 Set flags of stream. More...
 
ios_base::fmtflags setf (const ios_base::fmtflags f)
 Set flags of stream. More...
 
ios_base::fmtflags setf (const ios_base::fmtflags f, const ios_base::fmtflags mask)
 Set flags of given field of stream. More...
 
void unsetf (const ios_base::fmtflags f)
 Unset flags of stream. More...
 
virtual void print (Ostream &os) const
 Print 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...
 

Static Public Member Functions

static unsigned int defaultPrecision ()
 Return the default precision. More...
 
static unsigned int defaultPrecision (unsigned int prec)
 Reset the default precision. More...
 
- Static Public Member Functions inherited from IOstreamOption
static streamFormat formatEnum (const word &formatName, 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

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

void setOpened ()
 Set stream opened. More...
 
void setClosed ()
 Set stream closed. More...
 
void setState (ios_base::iostate state)
 Set stream state. More...
 
void setGood ()
 Set stream to be good. More...
 

Protected Attributes

streamAccess openClosed_
 
ios_base::iostate ioState_
 
unsigned short labelByteSize_
 The label byte-size (could also be stored as byte) More...
 
unsigned short scalarByteSize_
 The scalar byte-size (could also be stored as byte) More...
 
label lineNumber_
 The file line. More...
 

Static Protected Attributes

static fileName staticName_
 Name for any generic stream - normally treat as readonly. More...
 

Detailed Description

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.

Source files

Definition at line 75 of file IOstream.H.

Member Enumeration Documentation

◆ streamAccess

enum streamAccess : char

Enumeration for stream open/closed state.

Enumerator
CLOSED 

stream not open

OPENED 

stream is open

Definition at line 84 of file IOstream.H.

Constructor & Destructor Documentation

◆ IOstream() [1/3]

IOstream ( const IOstream )
default

Copy construct.

◆ ~IOstream()

virtual ~IOstream ( )
virtualdefault

Destructor.

◆ IOstream() [2/3]

IOstream ( IOstreamOption  streamOpt = IOstreamOption())
inlineexplicit

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

Definition at line 162 of file IOstream.H.

References IOstream::setBad().

Here is the call graph for this function:

◆ IOstream() [3/3]

IOstream ( streamFormat  fmt,
versionNumber  ver,
compressionType  comp = compressionType::UNCOMPRESSED 
)
inline

Construct with format, version (compression)

Definition at line 176 of file IOstream.H.

Member Function Documentation

◆ setOpened()

void setOpened ( )
inlineprotected

Set stream opened.

Definition at line 123 of file IOstream.H.

References IOstream::openClosed_, and IOstream::OPENED.

Referenced by ITstream::ITstream(), OTstream::OTstream(), and UOPstream::UOPstream().

Here is the caller graph for this function:

◆ setClosed()

void setClosed ( )
inlineprotected

Set stream closed.

Definition at line 129 of file IOstream.H.

References IOstream::CLOSED, and IOstream::openClosed_.

◆ setState()

void setState ( ios_base::iostate  state)
inlineprotected

Set stream state.

Definition at line 135 of file IOstream.H.

References IOstream::ioState_.

Referenced by ISstream::get().

Here is the caller graph for this function:

◆ setGood()

void setGood ( )
inlineprotected

Set stream to be good.

Definition at line 141 of file IOstream.H.

References IOstream::ioState_.

Referenced by ITstream::ITstream(), OTstream::OTstream(), IListStream::rewind(), UOListStream::rewind(), UIListStream::rewind(), OCountStream::rewind(), OListStream::rewind(), and UOPstream::UOPstream().

Here is the caller graph for this function:

◆ name() [1/2]

◆ name() [2/2]

Foam::fileName & name ( )
virtual

Return non-const access to the name of the stream.

Useful to alter the stream name

Reimplemented in ITstream, primitiveEntry, ISstream, and OSstream.

Definition at line 45 of file IOstream.C.

◆ check()

bool check ( const char *  operation) const
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 51 of file IOstream.C.

Referenced by CollidingParcel< ParcelType >::CollidingParcel(), CollisionRecordList< vector, vector >::CollisionRecordList(), DSMCParcel< ParcelType >::DSMCParcel(), eddy::eddy(), faBoundaryMesh::faBoundaryMesh(), findCellParticle::findCellParticle(), ignitionSite::ignitionSite(), injectedParticle::injectedParticle(), Foam::input(), KinematicParcel< ParcelType >::KinematicParcel(), kinematicParcelInjectionData::kinematicParcelInjectionData(), molecule::molecule(), MPPICParcel< ParcelType >::MPPICParcel(), objectMap::objectMap(), Foam::RBD::operator<<(), Foam::operator<<(), Foam::functionObjects::operator<<(), Foam::operator>>(), Foam::RBD::operator>>(), Foam::functionObjects::operator>>(), orientedType::orientedType(), Foam::output(), PairCollisionRecord< Type >::PairCollisionRecord(), particle< Type >::particle(), polyBoundaryMesh::polyBoundaryMesh(), pyramid< Point, PointRef, polygonRef >::pyramid(), 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(), PackedList< 2 >::setPair(), solidParticle::solidParticle(), SprayParcel< ParcelType >::SprayParcel(), streamLineParticle::streamLineParticle(), surfZoneIOList::surfZoneIOList(), ThermoParcel< ParcelType >::ThermoParcel(), thermoParcelInjectionData::thermoParcelInjectionData(), trackedParticle::trackedParticle(), VectorSpace< DiagTensor< Cmpt >, Cmpt, 3 >::VectorSpace(), wallBoundedParticle::wallBoundedParticle(), wallBoundedStreamLineParticle::wallBoundedStreamLineParticle(), WallCollisionRecord< Type >::WallCollisionRecord(), dictionaryListEntry::write(), PtrListDetail< Foam::diameterModels::velocityGroup >::write(), edgeMeshFormat::write(), SHA1Digest::write(), dimensionSet::write(), particle< Type >::writeCoordinates(), faBoundaryMesh::writeData(), polyBoundaryMesh::writeData(), DimensionedField< Type, Foam::pointMesh >::writeData(), GeometricField< Type, PatchField, GeoMesh >::Boundary::writeEntry(), dimensioned< vector >::writeEntry(), HashTable< Foam::phase * >::writeKeys(), UILList< LListBase, T >::writeList(), LList< Foam::string >::writeList(), IndirectListBase< T, Addr >::writeList(), FixedList< Type, 3 >::writeList(), UList< Foam::wordRe >::writeList(), Matrix< RectangularMatrix< Type >, Type >::writeMatrix(), injectedParticle::writePosition(), and particle< Type >::writePosition().

◆ fatalCheck()

bool fatalCheck ( const char *  operation) const

Check IOstream status for given operation.

Generate a FatalIOError when an error has occurred.

Definition at line 57 of file IOstream.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and Foam::name().

Referenced by dictionaryEntry::dictionaryEntry(), functionEntry::execute(), entry::New(), decomposedBlockData::numBlocks(), Foam::operator>>(), Foam::blockMeshTools::read(), primitiveEntry::read(), PackedList< 2 >::read(), decomposedBlockData::readBlock(), decomposedBlockData::readBlocks(), PtrList< transferModel >::readIstream(), decomposedBlockData::readMasterHeader(), and Matrix< RectangularMatrix< Type >, Type >::readMatrix().

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

◆ opened()

bool opened ( ) const
inline

Return true if stream has been opened.

Definition at line 212 of file IOstream.H.

References IOstream::openClosed_, and IOstream::OPENED.

Referenced by meshRefinement::findRegions().

Here is the caller graph for this function:

◆ closed()

bool closed ( ) const
inline

Return true if stream is closed.

Definition at line 218 of file IOstream.H.

References IOstream::CLOSED, and IOstream::openClosed_.

◆ good()

bool good ( ) const
inline

Return true if next operation might succeed.

Definition at line 224 of file IOstream.H.

References IOstream::ioState_.

Referenced by collatedFileOperation::appendObject(), backwardDdtScheme< Type >::backwardDdtScheme(), topoSetSource::checkIs(), dynamicCode::copyAndFilter(), dynamicCode::copyOrCreateFiles(), writeFile::createFile(), AC3DsurfaceFormatCore::cueTo(), directionalPressureGradientExplicitSource::directionalPressureGradientExplicitSource(), ensightSurfaceReader::geometry(), ISstream::get(), edgeMeshFormatsCore::getLineNoComment(), surfaceFormatsCore::getLineNoComment(), meanVelocityForce::meanVelocityForce(), decomposedBlockData::numBlocks(), csvTableReader< Type >::operator()(), argList::parse(), rawIOField< Type >::rawIOField(), extendedEdgeMeshFormat::read(), extendedFeatureEdgeMeshFormat::read(), OBJsurfaceFormat< Face >::read(), OBJedgeFormat::read(), NASedgeFormat::read(), OFFsurfaceFormat< Face >::read(), edgeMeshFormat::read(), VTKedgeFormat::read(), ABAQUSsurfaceFormat< Face >::read(), tabulated6DoFAcceleration::read(), AC3DsurfaceFormat< Face >::read(), GTSsurfaceFormat< Face >::read(), STARCDsurfaceFormat< Face >::read(), NASsurfaceFormat< Face >::read(), STARCDedgeFormat::read(), tabulated6DoFMotion::read(), VTKsurfaceFormat< Face >::read(), ABAQUSCore::readHelper::read(), dictionary::read(), masterUncollatedFileOperation::readAndSend(), decomposedBlockData::readBlocks(), STARCDMeshReader::readBoundary(), ensightSurfaceReader::readCase(), STARCDMeshReader::readCells(), AC3DsurfaceFormatCore::readCmd(), UniformDimensionedField< vector >::readData(), GlobalIOList< kinematicParcelInjectionData >::readData(), GlobalIOField< vector >::readData(), ensightSurfaceReader::readField(), STARCDCore::readHeader(), IOobject::readHeader(), masterUncollatedFileOperation::readHeader(), STARCDsurfaceFormatCore::readInpCellTable(), ensightSurfaceReader::readLine(), STARCDMeshReader::readPoints(), STARCDCore::readPoints(), noiseFFT::setData(), Reaction< ReactionThermo >::setLRhs(), ensightSurfaceReader::skip(), TableFile< Type >::TableFile(), FLMAsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), GTSsurfaceFormat< Face >::write(), OBJedgeFormat::write(), TRIsurfaceFormat< Face >::write(), ABAQUSsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), VTKedgeFormat::write(), edgeMeshFormat::write(), graph::write(), dynamicIndexedOctree< Foam::dynamicTreeDataPoint >::write(), indexedOctree< Foam::treeDataPrimitivePatch< PatchType > >::write(), STLsurfaceFormat< Face >::writeAscii(), correlationFunction< Type >::writeAveraged(), decomposedBlockData::writeBlocks(), fieldDictionary::writeData(), surfZoneIOList::writeData(), featureEdgeMesh::writeData(), rawIOField< Type >::writeData(), IOPosition< CloudType >::writeData(), exprDriverWriter::writeData(), UniformDimensionedField< vector >::writeData(), constant::writeData(), lumpedPointIOMovement::writeData(), baseIOdictionary::writeData(), porousModel::writeData(), surfaceTensionModel::writeData(), porosityModelList::writeData(), temperatureDependent::writeData(), decomposedBlockData::writeData(), extendedFeatureEdgeMesh::writeData(), virtualMassModel::writeData(), polyTopoChanger::writeData(), dragModel::writeData(), faBoundaryMesh::writeData(), AveragingMethod< Foam::Vector >::writeData(), coordinateSystems::writeData(), exprResultGlobals::writeData(), BlendedInterfacialModel< wallLubricationModel >::writeData(), MRFZoneList::writeData(), optionList::writeData(), cellModel::writeData(), profiling::writeData(), ZoneMesh< cellZone, polyMesh >::writeData(), polyBoundaryMesh::writeData(), DimensionedField< Type, Foam::pointMesh >::writeData(), refinementHistory::writeData(), populationBalanceModel::writeData(), GeometricField< Type, fvPatchField, volMesh >::writeData(), pairPotential::writeEnergyAndForceTables(), dictionary::writeEntries(), IOobject::writeHeader(), collatedFileOperation::writeObject(), fileOperation::writeObject(), and masterUncollatedFileOperation::writeObject().

◆ eof()

◆ fail()

bool fail ( ) const
inline

Return true if next operation will fail.

Definition at line 236 of file IOstream.H.

References IOstream::ioState_.

Referenced by IOstream::operator bool(), and IOstream::operator!().

Here is the caller graph for this function:

◆ bad()

bool bad ( ) const
inline

Return true if stream is corrupted.

Definition at line 242 of file IOstream.H.

References IOstream::ioState_.

Referenced by Foam::getToken(), Istream::putBack(), GTSsurfaceFormat< Face >::read(), primitiveEntry::read(), dictionary::read(), featureEdgeMesh::readData(), exprDriverWriter::readData(), baseIOdictionary::readData(), extendedFeatureEdgeMesh::readData(), exprResultGlobals::readData(), refinementHistory::readData(), ifeqEntry::readToken(), error::write(), and IOerror::write().

Here is the caller graph for this function:

◆ operator bool()

operator bool ( ) const
inlineexplicit

Return true if the stream has not failed.

Definition at line 248 of file IOstream.H.

References IOstream::fail().

Here is the call graph for this function:

◆ operator!()

bool operator! ( ) const
inline

Return true if the stream has failed.

Definition at line 254 of file IOstream.H.

References IOstream::fail().

Here is the call graph for this function:

◆ labelByteSize()

unsigned labelByteSize ( ) const
inline

The label byte-size associated with the stream.

Definition at line 263 of file IOstream.H.

References IOstream::labelByteSize_.

Referenced by decomposedBlockData::readBlock().

Here is the caller graph for this function:

◆ scalarByteSize()

unsigned scalarByteSize ( ) const
inline

The scalar byte-size associated with the stream.

Definition at line 269 of file IOstream.H.

References IOstream::scalarByteSize_.

Referenced by decomposedBlockData::readBlock().

Here is the caller graph for this function:

◆ setLabelByteSize()

void setLabelByteSize ( unsigned  nbytes)
inline

Set the label byte-size associated with the stream.

Definition at line 275 of file IOstream.H.

References IOstream::labelByteSize_.

Referenced by IOobject::readHeader().

Here is the caller graph for this function:

◆ setScalarByteSize()

void setScalarByteSize ( unsigned  nbytes)
inline

Set the scalar byte-size associated with the stream.

Definition at line 281 of file IOstream.H.

References IOstream::scalarByteSize_.

Referenced by IOobject::readHeader().

Here is the caller graph for this function:

◆ checkLabelSize()

std::enable_if<std::is_integral<T>::value, bool>::type checkLabelSize ( ) const
inline

Check if the label byte-size associated with the stream is the same as the given type

Definition at line 291 of file IOstream.H.

References IOstream::labelByteSize_, 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>>(), particle< Type >::particle(), ReactingParcel< ParcelType >::ReactingParcel(), Foam::readRawLabel(), solidParticle::solidParticle(), SprayParcel< ParcelType >::SprayParcel(), ThermoParcel< ParcelType >::ThermoParcel(), trackedParticle::trackedParticle(), and wallBoundedParticle::wallBoundedParticle().

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

◆ checkScalarSize()

std::enable_if<std::is_floating_point<T>::value, bool>::type checkScalarSize ( ) const
inline

Check if the scalar byte-size associated with the stream is the same as the given type

Definition at line 300 of file IOstream.H.

References IOstream::scalarByteSize_, 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>>(), particle< Type >::particle(), ReactingParcel< ParcelType >::ReactingParcel(), solidParticle::solidParticle(), SprayParcel< ParcelType >::SprayParcel(), ThermoParcel< ParcelType >::ThermoParcel(), trackedParticle::trackedParticle(), and wallBoundedParticle::wallBoundedParticle().

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

◆ lineNumber() [1/3]

label lineNumber ( ) const
inline

Const access to the current stream line number.

Definition at line 309 of file IOstream.H.

References IOstream::lineNumber_.

Referenced by entry::checkITstream(), dictionary::checkITstream(), codeStream::evaluate(), functionEntry::execute(), ifeqEntry::execute(), ITstream::print(), NASedgeFormat::read(), NASsurfaceFormat< Face >::read(), IOobject::readHeader(), functionEntry::readLine(), IOerror::SafeFatalIOError(), and ifeqEntry::skipUntil().

Here is the caller graph for this function:

◆ lineNumber() [2/3]

label& lineNumber ( )
inline

Non-const access to the current stream line number.

Definition at line 315 of file IOstream.H.

References IOstream::lineNumber_.

◆ lineNumber() [3/3]

label lineNumber ( const label  num)
inline

Set the stream line number.

Returns
the previous value

Definition at line 322 of file IOstream.H.

◆ flags() [1/2]

virtual ios_base::fmtflags flags ( ) const
pure virtual

Return flags of stream.

Implemented in ITstream, OTstream, dummyISstream, ISstream, UOPstream, UIPstream, and OSstream.

Referenced by IOstream::setf(), and IOstream::unsetf().

Here is the caller graph for this function:

◆ defaultPrecision() [1/2]

static unsigned int defaultPrecision ( )
inlinestatic

◆ defaultPrecision() [2/2]

static unsigned int defaultPrecision ( unsigned int  prec)
inlinestatic

Reset the default precision.

Returns
the previous value

Definition at line 340 of file IOstream.H.

◆ setEof()

void setEof ( )
inline

Set stream to have reached eof.

Definition at line 348 of file IOstream.H.

References IOstream::ioState_.

◆ setFail()

void setFail ( )
inline

Set stream to have failed.

Definition at line 354 of file IOstream.H.

References IOstream::ioState_.

◆ setBad()

void setBad ( )
inline

Set stream to be bad.

Definition at line 360 of file IOstream.H.

References IOstream::ioState_.

Referenced by IOstream::IOstream(), and Foam::operator>>().

Here is the caller graph for this function:

◆ flags() [2/2]

virtual ios_base::fmtflags flags ( const ios_base::fmtflags  f)
pure virtual

Set flags of stream.

Implemented in ITstream, UOPstream, OTstream, UIPstream, dummyISstream, ISstream, and OSstream.

◆ setf() [1/2]

ios_base::fmtflags setf ( const ios_base::fmtflags  f)
inline

Set flags of stream.

Definition at line 369 of file IOstream.H.

References f(), and IOstream::flags().

Referenced by Foam::dec(), Foam::fixed(), Foam::hex(), writeFile::initStream(), Foam::oct(), Foam::scientific(), Foam::setf(), NASCore::setPrecision(), ensightSetWriter< Type >::write(), ensightWriter::writeCollated(), nastranWriter::writeFaceValue(), NASCore::writeKeyword(), STARCDCore::writePoints(), ABAQUSCore::writePoints(), and ensightWriter::writeUncollated().

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

◆ setf() [2/2]

ios_base::fmtflags setf ( const ios_base::fmtflags  f,
const ios_base::fmtflags  mask 
)
inline

Set flags of given field of stream.

Definition at line 376 of file IOstream.H.

References f(), and IOstream::flags().

Here is the call graph for this function:

◆ unsetf()

void unsetf ( const ios_base::fmtflags  f)
inline

Unset flags of stream.

Definition at line 385 of file IOstream.H.

References f(), and IOstream::flags().

Referenced by nastranWriter::writeFaceValue(), and NASCore::writeKeyword().

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

◆ print() [1/2]

void print ( Ostream os) const
virtual

Print stream description to Ostream.

Reimplemented in OListStream, ITstream, OCountStream, UIListStream, UOPstream, OTstream, UOListStream, OStringStream, OSstream, ISstream, IListStream, UIPstream, IStringStream, prefixOSstream, OFstream, and IFstream.

Definition at line 72 of file IOstream.C.

References Foam::endl(), format(), and Foam::foamVersion::version.

Referenced by ISstream::print(), OSstream::print(), OTstream::print(), ITstream::print(), HashTable< T, Key, Hash >::Iterator< true >::print(), and decompositionInformation::printSummary().

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

◆ print() [2/2]

void print ( Ostream os,
const int  streamState 
) const

Print information about the stream state bits.

Definition at line 111 of file IOstream.C.

References Foam::endl().

Here is the call graph for this function:

◆ info()

InfoProxy<IOstream> info ( ) const
inline

Return info proxy.

Used to print IOstream information to a stream

Definition at line 404 of file IOstream.H.

Referenced by MultiInteraction< CloudType >::info(), dimensionSet::read(), and IOobject::writeHeader().

Here is the caller graph for this function:

Member Data Documentation

◆ precision_

unsigned int precision_
static

Default precision.

Definition at line 94 of file IOstream.H.

Referenced by IOstream::defaultPrecision(), and functionObjectList::execute().

◆ staticName_

Foam::fileName staticName_
staticprotected

Name for any generic stream - normally treat as readonly.

Definition at line 102 of file IOstream.H.

Referenced by IOstream::name().

◆ openClosed_

streamAccess openClosed_
protected

◆ ioState_

◆ labelByteSize_

unsigned short labelByteSize_
protected

The label byte-size (could also be stored as byte)

Definition at line 109 of file IOstream.H.

Referenced by IOstream::checkLabelSize(), IOstream::labelByteSize(), and IOstream::setLabelByteSize().

◆ scalarByteSize_

unsigned short scalarByteSize_
protected

The scalar byte-size (could also be stored as byte)

Definition at line 112 of file IOstream.H.

Referenced by IOstream::checkScalarSize(), IOstream::scalarByteSize(), and IOstream::setScalarByteSize().

◆ lineNumber_

label lineNumber_
protected

The file line.

Definition at line 115 of file IOstream.H.

Referenced by ISstream::get(), and IOstream::lineNumber().


The documentation for this class was generated from the following files: