regIOobject Class Referenceabstract

regIOobject is an abstract class derived from IOobject to handle automatic object registration with the objectRegistry. More...

Inherits IOobject.

Inherited by BlendedInterfacialModel< dragModel >, BlendedInterfacialModel< Foam::dragModel >, BlendedInterfacialModel< Foam::heatTransferModel >, BlendedInterfacialModel< Foam::liftModel >, BlendedInterfacialModel< Foam::turbulentDispersionModel >, BlendedInterfacialModel< Foam::virtualMassModel >, BlendedInterfacialModel< Foam::wallLubricationModel >, BlendedInterfacialModel< heatTransferModel >, BlendedInterfacialModel< liftModel >, BlendedInterfacialModel< phaseTransferModel >, BlendedInterfacialModel< turbulentDispersionModel >, BlendedInterfacialModel< virtualMassModel >, BlendedInterfacialModel< wallLubricationModel >, adjointSolverManager, ATCModel, baseIOdictionary, BlendedInterfacialModel< ModelType >, coordinateSystems, decomposedBlockData, populationBalanceModel, exprDriverWriter, exprResultGlobals, extendedFeatureEdgeMesh, faBoundaryMesh, featureEdgeMesh, fieldDictionary, GlobalIOField< Type >, GlobalIOList< Type >, adjointTurbulenceModel, IOList< T >, IOMap< T >, IOmapDistribute, IOmapDistributePolyMesh, IOPtrList< T >, lumpedPointIOMovement, meshObject, objectiveManager, objectRegistry, PDRDragModel, polyBoundaryMesh, polyBoundaryMeshEntries, polyTopoChanger, porosityModel, porousModel, rawIOField< Type >, refinementHistory, searchableSurface, SLGThermo, solutionControl, SubDimensionedField< Type, GeoMesh >, surfaceTensionModel, surfZoneIOList, topoSet, UniformDimensionedField< Type >, virtualMassModel, GlobalIOField< vector >, GlobalIOList< kinematicParcelInjectionData >, GlobalIOList< reactingMultiphaseParcelInjectionData >, GlobalIOList< reactingParcelInjectionData >, IOList< label >, IOList< labelList >, IOPtrList< Foam::entry >, UniformDimensionedField< scalar >, and UniformDimensionedField< vector >.

Collaboration diagram for regIOobject:
[legend]

Public Member Functions

 TypeName ("regIOobject")
 Runtime type information. More...
 
 regIOobject (const IOobject &io, const bool isTime=false)
 
 regIOobject (const regIOobject &rio)
 Copy construct. More...
 
 regIOobject (const regIOobject &rio, bool registerCopy)
 
 regIOobject (const word &newName, const regIOobject &, bool registerCopy)
 
 regIOobject (const IOobject &io, const regIOobject &rio)
 Copy construct with new IO parameters. More...
 
virtual ~regIOobject ()
 Destructor. More...
 
bool checkIn ()
 Add object to registry, if not already registered. More...
 
bool checkOut ()
 Remove all file watches and remove object from registry. More...
 
virtual void addWatch ()
 Add file watch on object (if registered and READ_IF_MODIFIED) More...
 
bool ownedByRegistry () const
 Is this object owned by the registry? More...
 
bool store ()
 
void release (const bool unregister=false)
 Release ownership of this object from its registry. More...
 
label eventNo () const
 Event number at last update. More...
 
label & eventNo ()
 Event number at last update. More...
 
bool upToDate (const regIOobject &) const
 Return true if up-to-date with respect to given object. More...
 
bool upToDate (const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &, const regIOobject &) const
 Return true if up-to-date with respect to given objects. More...
 
void setUpToDate ()
 Set as up-to-date. More...
 
virtual void rename (const word &newName)
 Rename. More...
 
virtual fileName filePath () const
 Return complete path + object name if the file exists. More...
 
bool headerOk ()
 Read and check header info. More...
 
IstreamreadStream (const word &, const bool valid=true)
 Return Istream and check object type against that given. More...
 
void close ()
 Close Istream. More...
 
virtual bool readData (Istream &)
 Virtual readData function. More...
 
virtual bool read ()
 Read object. More...
 
virtual label addWatch (const fileName &)
 Add file watch for fileName on object if not yet watched. More...
 
const labelListwatchIndices () const
 Return file-monitoring handles. More...
 
labelListwatchIndices ()
 Return file-monitoring handles. More...
 
virtual bool modified () const
 
virtual bool readIfModified ()
 Read object if modified (as set by call to modified) More...
 
virtual bool writeData (Ostream &) const =0
 Pure virtual writeData function. More...
 
virtual bool writeObject (IOstreamOption streamOpt, const bool valid) const
 Write using stream options. More...
 
virtual bool write (const bool valid=true) const
 Write using setting from DB. More...
 
virtual bool global () const
 Is object global. More...
 
void operator= (const IOobject &io)
 Copy assignment. More...
 
virtual bool writeObject (IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType comp, const bool valid) const
 Write using given format, version and compression. More...
 
- Public Member Functions inherited from IOobject
 TypeName ("IOobject")
 Declare type-name, virtual type (with debug switch) More...
 
 IOobject (const IOobject &)=default
 Copy construct. More...
 
virtual ~IOobject ()=default
 Destructor. More...
 
 IOobject (const word &name, const fileName &instance, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from name, instance, registry, io options. More...
 
 IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 Construct from name, instance, local, registry, io options. More...
 
 IOobject (const fileName &path, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 Construct from path, registry, io options. More...
 
 IOobject (const IOobject &io, const objectRegistry &registry)
 Copy construct, resetting registry. More...
 
 IOobject (const IOobject &io, const word &name)
 Copy construct, resetting name. More...
 
 IOobject (const IOobject &io, readOption, writeOption)
 Copy construct, resetting io options. More...
 
autoPtr< IOobjectclone () const
 Clone. More...
 
autoPtr< IOobjectclone (const objectRegistry &registry) const
 Clone resetting registry. More...
 
const objectRegistrydb () const
 Return the local objectRegistry. More...
 
const Timetime () const
 Return time. More...
 
const wordname () const
 Return name. More...
 
const wordheaderClassName () const
 Return name of the class name read from header. More...
 
wordheaderClassName ()
 Return non-constant access to the class name read from header. More...
 
const stringnote () const
 Return the optional note. More...
 
stringnote ()
 Return non-constant access to the optional note. More...
 
bool registerObject () const
 Should object created with this IOobject be registered? More...
 
boolregisterObject ()
 Should object created with this IOobject be registered? More...
 
bool globalObject () const
 Is object same for all processors? More...
 
boolglobalObject ()
 Is object same for all processors? More...
 
unsigned labelByteSize () const
 The label byte-size, possibly read from the header. More...
 
unsigned scalarByteSize () const
 The scalar byte-size, possibly read from the header. More...
 
bool isHeaderClassName (const word &clsName) const
 Test if headerClassName() equals the given class name. More...
 
template<class Type >
bool isHeaderClassName () const
 Test if headerClassName() equals Type::typeName. More...
 
readOption readOpt () const
 The read option. More...
 
readOptionreadOpt ()
 Non-constant access to the read option. More...
 
writeOption writeOpt () const
 The write option. More...
 
writeOptionwriteOpt ()
 Non-constant access to the write option. More...
 
word group () const
 Return group (extension part of name) More...
 
word member () const
 Return member (name without the extension) More...
 
const fileNamerootPath () const
 
const fileNamecaseName () const
 
const fileNameinstance () const
 
fileNameinstance ()
 
const fileNamelocal () const
 
fileName path () const
 The complete path. More...
 
fileName path (const word &instance, const fileName &local=fileName::null) const
 The complete path with alternative instance and local. More...
 
fileName objectPath () const
 The complete path + object name. More...
 
fileName localFilePath (const word &typeName, const bool search=true) const
 Helper for filePath that searches locally. More...
 
fileName globalFilePath (const word &typeName, const bool search=true) const
 Helper for filePath that searches up if in parallel. More...
 
bool readHeader (Istream &is)
 Read header. More...
 
template<class Type >
bool typeHeaderOk (const bool checkType=true, const bool search=true, const bool verbose=true)
 Read header (uses typeFilePath to find file) and check its info. More...
 
template<class Type >
void warnNoRereading () const
 Helper: warn that type does not support re-reading. More...
 
bool writeHeader (Ostream &os) const
 Write header. More...
 
bool writeHeader (Ostream &os, const word &objectType) const
 Write header. Allow override of type. More...
 
bool good () const
 
bool bad () const
 
InfoProxy< IOobjectinfo () const
 Return info proxy. More...
 
void operator= (const IOobject &io)
 
template<>
bool isHeaderClassName () const
 Specialization for void always returns true (no headerClassName check). More...
 
template<class StringType >
Foam::word groupName (StringType base, const word &group)
 
template<class StringType >
Foam::word scopedName (StringType scope, const word &name)
 

Static Public Member Functions

template<class Type >
static Type & store (Type *p)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (autoPtr< Type > &ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (autoPtr< Type > &&ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (refPtr< Type > &ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (refPtr< Type > &&ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (tmp< Type > &ptr)
 Transfer pointer ownership to its registry. More...
 
template<class Type >
static Type & store (tmp< Type > &&ptr)
 Transfer pointer ownership to its registry. More...
 
- Static Public Member Functions inherited from IOobject
static bool fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name)
 Split path into instance, local, name components. More...
 
template<class StringType >
static word groupName (StringType base, const word &group)
 Create dot-delimited name.group string. More...
 
static word group (const word &name)
 Return group (extension part of name) More...
 
static word member (const word &name)
 Return member (name without the extension) More...
 
template<class StringType >
static word scopedName (StringType scope, const word &name)
 Create scope:name or scope_name string. More...
 
static IOobject selectIO (const IOobject &io, const fileName &altFile, const word &ioName="")
 Return the IOobject, but also consider an alternative file name. More...
 
static OstreamwriteBanner (Ostream &os, bool noHint=false)
 Write the standard OpenFOAM file/dictionary banner. More...
 
static OstreamwriteDivider (Ostream &os)
 Write the standard file section divider. More...
 
static OstreamwriteEndDivider (Ostream &os)
 Write the standard end file divider. More...
 

Static Public Attributes

static float fileModificationSkew
 
static int maxFileModificationPolls
 
- Static Public Attributes inherited from IOobject
static const Enum< fileCheckTypesfileCheckTypesNames
 Names for the fileCheckTypes. More...
 
static char scopeSeparator
 Character for scoping object names (':' or '_') More...
 
static fileCheckTypes fileModificationChecking
 Type of file modification checking. More...
 

Protected Member Functions

bool readHeaderOk (const IOstream::streamFormat PstreamFormat, const word &typeName)
 Helper: check readOpt flags and read if necessary. More...
 
IstreamobjectStream ()
 Construct and return an IFstream for the object. More...
 
- Protected Member Functions inherited from IOobject
void setBad (const string &s)
 Set the object state to bad. More...
 

Static Protected Attributes

static bool masterOnlyReading = false
 To flag master-only reading of objects. More...
 

Friends

class functionEntries::codeStream
 Friendship with classes needing access to masterOnlyReading. More...
 
class fileOperations::uncollatedFileOperation
 

Additional Inherited Members

- Public Types inherited from IOobject
enum  objectState : char { GOOD, BAD }
 Enumeration defining the valid states of an IOobject. More...
 
enum  readOption : char { MUST_READ, MUST_READ_IF_MODIFIED, READ_IF_PRESENT, NO_READ }
 Enumeration defining the read options. More...
 
enum  writeOption : char { AUTO_WRITE = 0, NO_WRITE = 1 }
 Enumeration defining the write options. More...
 
enum  fileCheckTypes : char { timeStamp, timeStampMaster, inotify, inotifyMaster }
 Enumeration defining the file checking options. More...
 

Detailed Description

regIOobject is an abstract class derived from IOobject to handle automatic object registration with the objectRegistry.

Source files

Definition at line 71 of file regIOobject.H.

Constructor & Destructor Documentation

◆ regIOobject() [1/5]

regIOobject ( const IOobject io,
const bool  isTime = false 
)

Construct from IOobject. The optional flag adds special handling if the object is the top-level regIOobject (eg, Time).

Definition at line 70 of file regIOobject.C.

References regIOobject::checkIn(), and IOobject::registerObject().

Here is the call graph for this function:

◆ regIOobject() [2/5]

regIOobject ( const regIOobject rio)

Copy construct.

Definition at line 86 of file regIOobject.C.

◆ regIOobject() [3/5]

regIOobject ( const regIOobject rio,
bool  registerCopy 
)

Copy construct, transferring registry registration to the copy if registerCopy is true

Definition at line 99 of file regIOobject.C.

References regIOobject::checkIn(), and regIOobject::checkOut().

Here is the call graph for this function:

◆ regIOobject() [4/5]

regIOobject ( const word newName,
const regIOobject rio,
bool  registerCopy 
)

Copy construct with new name, transferring registry registration to the copy f registerCopy is true

Definition at line 121 of file regIOobject.C.

◆ regIOobject() [5/5]

regIOobject ( const IOobject io,
const regIOobject rio 
)

Copy construct with new IO parameters.

Definition at line 145 of file regIOobject.C.

◆ ~regIOobject()

~regIOobject ( )
virtual

Destructor.

Definition at line 166 of file regIOobject.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::name(), path(), Foam::Pout, and Foam::type().

Here is the call graph for this function:

Member Function Documentation

◆ readHeaderOk()

bool readHeaderOk ( const IOstream::streamFormat  PstreamFormat,
const word typeName 
)
protected

Helper: check readOpt flags and read if necessary.

Definition at line 39 of file regIOobjectRead.C.

References Foam::fileHandler(), format(), and fileOperation::read().

Referenced by IOdictionary::IOdictionary(), localIOdictionary::localIOdictionary(), and unwatchedIOdictionary::unwatchedIOdictionary().

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

◆ objectStream()

Istream* objectStream ( )
protected

Construct and return an IFstream for the object.

The results is NULL if the stream construction failed

◆ TypeName()

TypeName ( "regIOobject"  )

Runtime type information.

◆ checkIn()

bool checkIn ( )

Add object to registry, if not already registered.

Returns
true if object was already registered, or was newly registered

Definition at line 205 of file regIOobject.C.

References Foam::abort(), Foam::expressions::patchExpr::debug, polyMesh::defaultRegion, Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::name(), and WarningInFunction.

Referenced by regIOobject::regIOobject().

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

◆ checkOut()

bool checkOut ( )

Remove all file watches and remove object from registry.

Returns
true if object was registered and was removed

Definition at line 241 of file regIOobject.C.

References Foam::fileHandler(), forAllReverse, and fileOperation::removeWatch().

Referenced by regionFunctionObject::clearObject(), regionFunctionObject::clearObjects(), removeRegisteredObject::execute(), regIOobject::regIOobject(), and lumpedPointDisplacementPointPatchVectorField::~lumpedPointDisplacementPointPatchVectorField().

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

◆ addWatch() [1/2]

void addWatch ( )
virtual

Add file watch on object (if registered and READ_IF_MODIFIED)

Reimplemented in unwatchedIOdictionary.

Definition at line 284 of file regIOobject.C.

References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, Foam::fileHandler(), IOobject::fileModificationChecking, fileOperation::findWatch(), forAll, forAllReverse, fileOperation::getFile(), UPstream::master(), UPstream::parRun(), fileOperation::removeWatch(), Pstream::scatter(), List< T >::setSize(), and Foam::type().

Referenced by includeEntry::execute(), IOdictionary::IOdictionary(), IOMap< T >::IOMap(), and localIOdictionary::localIOdictionary().

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

◆ ownedByRegistry()

bool ownedByRegistry ( ) const
inline

Is this object owned by the registry?

Definition at line 31 of file regIOobjectI.H.

Referenced by objectRegistry::clear(), regionFunctionObject::clearObject(), regionFunctionObject::clearObjects(), objectRegistry::erase(), and removeRegisteredObject::execute().

Here is the caller graph for this function:

◆ store() [1/8]

bool store ( )
inline

Register object with its registry and transfer ownership to the registry.

Returns
true if now ownedByRegistry

Definition at line 37 of file regIOobjectI.H.

References Foam::name(), Foam::nl, and WarningInFunction.

Referenced by mappedPatchBase::constructIOField(), CrankNicolsonDdtScheme< Type >::ddt0_(), volPointInterpolation::interpolate(), lumpedPointDisplacementPointPatchVectorField::movement(), options::New(), zoneDistribute::New(), coordinateSystems::New(), polySurface::polySurface(), mappedPatchBase::storeField(), sampledSurface::storeSurfMesh(), objectRegistry::subRegistry(), and cellCellStencil::zoneID().

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

◆ store() [2/8]

Type & store ( Type *  p)
inlinestatic

Transfer pointer ownership to its registry.

Returns
reference to the stored object

Definition at line 54 of file regIOobjectI.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and p.

Here is the call graph for this function:

◆ store() [3/8]

Type & store ( autoPtr< Type > &  ptr)
inlinestatic

Transfer pointer ownership to its registry.

Resets (clears) the parameter.

Returns
reference to the stored object

Definition at line 78 of file regIOobjectI.H.

References autoPtr< T >::release().

Here is the call graph for this function:

◆ store() [4/8]

Type & store ( autoPtr< Type > &&  ptr)
inlinestatic

Transfer pointer ownership to its registry.

Resets (clears) the parameter.

Returns
reference to the stored object

Definition at line 86 of file regIOobjectI.H.

◆ store() [5/8]

Type & store ( refPtr< Type > &  ptr)
inlinestatic

Transfer pointer ownership to its registry.

Changes parameter from PTR to CREF (do not rely on this).

Returns
reference to the stored object

Definition at line 94 of file regIOobjectI.H.

References refPtr< T >::cref(), refPtr< T >::get(), refPtr< T >::is_pointer(), p, refPtr< T >::ptr(), and WarningInFunction.

Here is the call graph for this function:

◆ store() [6/8]

Type & store ( refPtr< Type > &&  ptr)
inlinestatic

Transfer pointer ownership to its registry.

Changes parameter from PTR to CREF (do not rely on this).

Returns
reference to the stored object

Definition at line 127 of file regIOobjectI.H.

◆ store() [7/8]

Type & store ( tmp< Type > &  ptr)
inlinestatic

Transfer pointer ownership to its registry.

Changes parameter from PTR to CREF (do not rely on this).

Returns
reference to the stored object

Definition at line 135 of file regIOobjectI.H.

References tmp< T >::cref(), tmp< T >::get(), tmp< T >::is_pointer(), p, tmp< T >::ptr(), and WarningInFunction.

Here is the call graph for this function:

◆ store() [8/8]

Type & store ( tmp< Type > &&  ptr)
inlinestatic

Transfer pointer ownership to its registry.

Changes parameter from PTR to CREF (do not rely on this).

Returns
reference to the stored object

Definition at line 168 of file regIOobjectI.H.

◆ release()

void release ( const bool  unregister = false)
inline

Release ownership of this object from its registry.

Parameters
unregisteroptionally set as non-registered

Definition at line 175 of file regIOobjectI.H.

Referenced by objectRegistry::clear(), and objectRegistry::erase().

Here is the caller graph for this function:

◆ eventNo() [1/2]

Foam::label eventNo ( ) const
inline

Event number at last update.

Definition at line 185 of file regIOobjectI.H.

Referenced by triSurfaceMesh::movePoints(), polyMesh::setUpToDatePoints(), cyclicACMIPolyPatch::updateAreas(), and regIOobject::upToDate().

Here is the caller graph for this function:

◆ eventNo() [2/2]

Foam::label & eventNo ( )
inline

Event number at last update.

Definition at line 190 of file regIOobjectI.H.

◆ upToDate() [1/4]

bool upToDate ( const regIOobject a) const

Return true if up-to-date with respect to given object.

Definition at line 354 of file regIOobject.C.

References regIOobject::eventNo(), and Foam::labelMax.

Referenced by cyclicACMIPolyPatch::upToDate(), and polyMesh::upToDatePoints().

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

◆ upToDate() [2/4]

bool upToDate ( const regIOobject a,
const regIOobject b 
) const

Return true if up-to-date with respect to given objects.

Definition at line 394 of file regIOobject.C.

References Foam::constant::physicoChemical::b.

◆ upToDate() [3/4]

bool upToDate ( const regIOobject a,
const regIOobject b,
const regIOobject c 
) const

Return true if up-to-date with respect to given objects.

Definition at line 404 of file regIOobject.C.

References Foam::constant::physicoChemical::b, and Foam::constant::universal::c.

◆ upToDate() [4/4]

bool upToDate ( const regIOobject a,
const regIOobject b,
const regIOobject c,
const regIOobject d 
) const

Return true if up-to-date with respect to given objects.

Definition at line 415 of file regIOobject.C.

References Foam::constant::physicoChemical::b, and Foam::constant::universal::c.

◆ setUpToDate()

void setUpToDate ( )

Set as up-to-date.

Definition at line 426 of file regIOobject.C.

Referenced by cyclicACMIPolyPatch::setUpToDate(), and cyclicACMIPolyPatch::updateAreas().

Here is the caller graph for this function:

◆ rename()

void rename ( const word newName)
virtual

Rename.

Reimplemented from IOobject.

Reimplemented in objectRegistry.

Definition at line 432 of file regIOobject.C.

References IOobject::rename().

Referenced by objectRegistry::rename().

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

◆ filePath()

Foam::fileName filePath ( ) const
virtual

Return complete path + object name if the file exists.

in the case directory otherwise null. Does not search up if parallel. Can be overridden to provide this functionality (e.g. IOdictionary)

Reimplemented in baseIOdictionary, distributedTriSurfaceMesh, triSurfaceMesh, porosityModel, searchableSurface, extendedFeatureEdgeMesh, UniformDimensionedField< Type >, UniformDimensionedField< scalar >, UniformDimensionedField< vector >, GlobalIOField< Type >, IOMap< T >, GlobalIOField< vector >, featureEdgeMesh, GlobalIOList< Type >, GlobalIOList< reactingParcelInjectionData >, GlobalIOList< reactingMultiphaseParcelInjectionData >, GlobalIOList< kinematicParcelInjectionData >, IOdictionary, localIOdictionary, and unwatchedIOdictionary.

Definition at line 447 of file regIOobject.C.

References Foam::type().

Referenced by rawIOField< Type >::rawIOField().

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

◆ headerOk()

bool headerOk ( )

Read and check header info.

Definition at line 453 of file regIOobject.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::fileHandler(), IOWarningInFunction, fileOperation::readHeader(), and Foam::type().

Referenced by extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(), faSchemes::faSchemes(), featureEdgeMesh::featureEdgeMesh(), fvSchemes::fvSchemes(), IOMap< T >::IOMap(), IOmapDistribute::IOmapDistribute(), IOmapDistributePolyMesh::IOmapDistributePolyMesh(), polyBoundaryMeshEntries::polyBoundaryMeshEntries(), rawIOField< Type >::rawIOField(), boundaryRegion::readDict(), cellTable::readDict(), refinementHistory::refinementHistory(), and topoSet::topoSet().

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

◆ readStream()

Foam::Istream & readStream ( const word expectName,
const bool  valid = true 
)

Return Istream and check object type against that given.

Definition at line 140 of file regIOobjectRead.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::name(), Foam::Pout, and Foam::type().

Referenced by extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(), featureEdgeMesh::featureEdgeMesh(), fieldDictionary::fieldDictionary(), IOMap< T >::IOMap(), IOmapDistribute::IOmapDistribute(), IOmapDistributePolyMesh::IOmapDistributePolyMesh(), polyBoundaryMeshEntries::polyBoundaryMeshEntries(), rawIOField< Type >::rawIOField(), refinementHistory::refinementHistory(), and topoSet::topoSet().

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

◆ close()

void close ( )

Close Istream.

Definition at line 182 of file regIOobjectRead.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), and Foam::Pout.

Referenced by extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(), featureEdgeMesh::featureEdgeMesh(), fieldDictionary::fieldDictionary(), IOMap< T >::IOMap(), IOmapDistribute::IOmapDistribute(), IOmapDistributePolyMesh::IOmapDistributePolyMesh(), rawIOField< Type >::rawIOField(), uncollatedFileOperation::read(), adjointRASModel::read(), masterUncollatedFileOperation::read(), refinementHistory::refinementHistory(), and topoSet::topoSet().

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

◆ readData()

◆ read()

bool read ( )
virtual

Read object.

Reimplemented in radiationModel, adjointTurbulenceModel, phaseChangeTwoPhaseMixture, turbulenceModel, phaseSystem, phaseSystem, basicThermo, Time, refinementHistory, adjointSpalartAllmaras, adjointRASModel, twoPhaseMixtureThermo, multiphaseSystem, twoPhaseMixtureEThermo, multiphaseMixture, laserDTRM, kinematicSingleLayer, fvDOM, incompressibleThreePhaseMixture, solarLoad, diffusionMulticomponent< ReactionThermo, ThermoType >, EDC< ReactionThermo >, thermoSingleLayer, crankConRod, incompressibleTwoPhaseInteractingMixture, faSchemes, viewFactor, solidThermo, twoPhaseSystem, motionSolver, rigidBodyMeshMotion, reactingOneDim, multiphaseSystem, engineTime, incompressibleTwoPhaseMixture, solution, rigidBodyMeshMotionSolver, FSD< ReactionThermo, ThermoType >, combustionModel, fvSchemes, temperaturePhaseChangeTwoPhaseMixture, SRFModel, sixDoFRigidBodyMotionSolver, interfaceHeatResistance, thermoIncompressibleTwoPhaseMixture, SIMPLEControl, regionModel, decomposedBlockData, CombustionModel< ReactionThermo >, adjointLaminar, solutionControl, optimisationManager, SchnerrSauer, zoneCombustion< ReactionThermo >, P1, Kunz, laminar< ReactionThermo >, eddyDissipationDiffusionModel< ReactionThermo, ThermoType >, PaSR< ReactionThermo >, eddyDissipationModelBase< ReactionThermo, ThermoType >, IOMRFZoneList, thermalBaffle, Merkle, singleStepCombustion< ReactionThermo, ThermoType >, diffusion< ReactionThermo, ThermoType >, singlePhaseTransportModel, constant, pimpleControl, infinitelyFastChemistry< ReactionThermo, ThermoType >, regionModel1D, noCombustion< ReactionThermo >, options, options, thermalBaffleModel, opaqueSolid, noRadiation, tolerances, rpm, singleLayerRegion, pyrolysisModel, IOporosityModelList, immiscibleIncompressibleTwoPhaseMixture, surfaceFilmRegionModel, thermo, noPyrolysis, noThermo, SIMPLEControlOpt, SIMPLEControlSingleRun, and simpleControl.

Definition at line 202 of file regIOobjectRead.C.

References IOstreamOption::BINARY, Foam::fileHandler(), IOobject::fileModificationChecking, forAll, forAllReverse, fileOperation::getFile(), fileOperation::read(), fileOperation::removeWatch(), List< T >::setSize(), and Foam::type().

Referenced by IOporosityModelList::read(), tolerances::read(), singlePhaseTransportModel::read(), IOMRFZoneList::read(), turbulenceModel::read(), optimisationManager::read(), regionModel::read(), SRFModel::read(), fvSchemes::read(), combustionModel::read(), solution::read(), incompressibleTwoPhaseMixture::read(), motionSolver::read(), twoPhaseSystem::read(), solidThermo::read(), faSchemes::read(), radiationModel::read(), multiphaseSystem::read(), basicThermo::read(), and phaseSystem::read().

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

◆ addWatch() [2/2]

Foam::label addWatch ( const fileName f)
virtual

Add file watch for fileName on object if not yet watched.

Returns
index of watch

Reimplemented in unwatchedIOdictionary.

Definition at line 260 of file regIOobject.C.

References f(), Foam::fileHandler(), and fileOperation::findWatch().

Here is the call graph for this function:

◆ watchIndices() [1/2]

const Foam::labelList & watchIndices ( ) const
inline

Return file-monitoring handles.

Definition at line 196 of file regIOobjectI.H.

Referenced by fileOperation::addWatches(), masterUncollatedFileOperation::addWatches(), and Time::readDict().

Here is the caller graph for this function:

◆ watchIndices() [2/2]

Foam::labelList & watchIndices ( )
inline

Return file-monitoring handles.

Definition at line 202 of file regIOobjectI.H.

◆ modified()

bool modified ( ) const
virtual

Return true if the object's file (or files for objectRegistry) have been modified. (modified state is cached by Time)

Reimplemented in objectRegistry.

Definition at line 248 of file regIOobjectRead.C.

References Foam::fileHandler(), forAllReverse, and fileMonitor::UNMODIFIED.

Here is the call graph for this function:

◆ readIfModified()

bool readIfModified ( )
virtual

Read object if modified (as set by call to modified)

Reimplemented in objectRegistry.

Definition at line 262 of file regIOobjectRead.C.

References Foam::endl(), Foam::fileHandler(), forAllReverse, fileOperation::getFile(), InfoInFunction, Foam::name(), Foam::read(), and fileMonitor::UNMODIFIED.

Here is the call graph for this function:

◆ writeData()

virtual bool writeData ( Ostream ) const
pure virtual

Pure virtual writeData function.

Must be defined in derived types

Implemented in surfaceTensionModel, searchableSurfaceWithGaps, polyBoundaryMesh, porosityModel, profiling, solidification, powerLawLopesdaCosta, adjointSimple, BlendedInterfacialModel< ModelType >, BlendedInterfacialModel< virtualMassModel >, BlendedInterfacialModel< liftModel >, BlendedInterfacialModel< Foam::wallLubricationModel >, BlendedInterfacialModel< Foam::dragModel >, BlendedInterfacialModel< Foam::heatTransferModel >, BlendedInterfacialModel< Foam::virtualMassModel >, BlendedInterfacialModel< dragModel >, BlendedInterfacialModel< Foam::liftModel >, BlendedInterfacialModel< heatTransferModel >, BlendedInterfacialModel< Foam::turbulentDispersionModel >, BlendedInterfacialModel< phaseTransferModel >, BlendedInterfacialModel< turbulentDispersionModel >, BlendedInterfacialModel< wallLubricationModel >, DarcyForchheimer, exprResultGlobals, coordinateSystems, powerLaw, fixedCoeff, simple, virtualMassModel, virtualMassModel, decomposedBlockData, temperatureDependent, MeshObject< fvMesh, MoveableMeshObject, FitDataType >, MeshObject< fvMesh, TopologicalMeshObject, centredCPCCellToFaceStencilObject >, MeshObject< polyMesh, GeometricMeshObject, meshSearchMeshObject >, MeshObject< fvMesh, MoveableMeshObject, CentredFitData< Polynomial > >, MeshObject< polyMesh, UpdateableMeshObject, decompositionModel >, MeshObject< polyMesh, UpdateableMeshObject, twoDPointCorrector >, MeshObject< fvMesh, UpdateableMeshObject, wallDist >, MeshObject< faMesh, Foam::MoveableMeshObject, leastSquaresFaVectors >, MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >, MeshObject< fvMesh, TopologicalMeshObject, centredCFCFaceToCellStencilObject >, MeshObject< fvMesh, TopologicalMeshObject, upwindFECCellToFaceStencilObject >, MeshObject< fvMesh, UpdateableMeshObject, zoneCellStencils >, MeshObject< fvMesh, TopologicalMeshObject, centredCECCellToCellStencilObject >, MeshObject< polyMesh, GeometricMeshObject, meshSearchFACE_CENTRE_TRISMeshObject >, MeshObject< fvMesh, TopologicalMeshObject, centredCPCCellToCellStencilObject >, MeshObject< fvMesh, MoveableMeshObject, LeastSquaresVectors< Stencil > >, MeshObject< fvMesh, TopologicalMeshObject, centredCFCCellToCellStencilObject >, MeshObject< fvMesh, MoveableMeshObject, leastSquaresVectors >, MeshObject< polyMesh, MoveableMeshObject, cellAspectRatio >, MeshObject< fvMesh, Foam::GeometricMeshObject, boundaryRadiationProperties >, MeshObject< fvMesh, UpdateableMeshObject, volPointInterpolation >, MeshObject< fvMesh, TopologicalMeshObject, upwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, TopologicalMeshObject, upwindCECCellToFaceStencilObject >, MeshObject< lduMesh, GeometricMeshObject, GAMGAgglomeration >, MeshObject< fvMesh, UpdateableMeshObject, zoneDistribute >, MeshObject< fvMesh, TopologicalMeshObject, upwindCPCCellToFaceStencilObject >, MeshObject< fvMesh, TopologicalMeshObject, pureUpwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, UpdateableMeshObject, volBSplinesBase >, MeshObject< fvMesh, TopologicalMeshObject, centredCECCellToFaceStencilObject >, MeshObject< fvMesh, MoveableMeshObject, UpwindFitData< Polynomial > >, MeshObject< polyMesh, Foam::UpdateableMeshObject, faMesh >, MeshObject< polyMesh, TopologicalMeshObject, regionSplit >, MeshObject< fvMesh, MoveableMeshObject, skewCorrectionVectors >, MeshObject< polyMesh, UpdateableMeshObject, pointMesh >, MeshObject< fvMesh, TopologicalMeshObject, centredCFCCellToFaceStencilObject >, MeshObject< fvMesh, TopologicalMeshObject, centredFECCellToFaceStencilObject >, MeshObject< Time, TopologicalMeshObject, gravity >, MeshObject< fvMesh, MoveableMeshObject, CentredFitSnGradData< Polynomial > >, surfaceTensionModel, RASTurbulenceModel, liquidProperties, surfaceTensionModel, porousModel, GlobalIOField< Type >, GlobalIOField< vector >, lumpedPointIOMovement, constant, GlobalIOList< Type >, GlobalIOList< reactingParcelInjectionData >, GlobalIOList< reactingMultiphaseParcelInjectionData >, GlobalIOList< kinematicParcelInjectionData >, exprDriverWriter, IOmapDistributePolyMesh, IOPtrList< T >, IOPtrList< Foam::entry >, IOMap< T >, rawIOField< Type >, IOList< T >, IOList< label >, IOList< labelList >, fieldDictionary, surfZoneIOList, objectRegistry, populationBalanceModel, refinementHistory, searchableSphere, topoSet, triSurfaceMesh, searchableCone, searchableSurfaceCollection, searchableRotatedBox, searchableBox, searchableCylinder, searchableDisk, searchablePlate, searchableExtrudedCircle, searchablePlane, ATCModel, adjointTurbulenceModel, faSchemes, solver, objectiveManager, adjointSolverManager, solutionControl, faBoundaryMesh, PDRDragModel, polyTopoChanger, extendedFeatureEdgeMesh, baseIOdictionary, UniformDimensionedField< Type >, UniformDimensionedField< scalar >, UniformDimensionedField< vector >, featureEdgeMesh, IOmapDistribute, polyBoundaryMeshEntries, and SLGThermo.

Referenced by collatedFileOperation::appendObject(), uncollatedFileOperation::read(), masterUncollatedFileOperation::read(), searchableSurfaceWithGaps::writeData(), mappedPatchBase::writeDict(), collatedFileOperation::writeObject(), fileOperation::writeObject(), and masterUncollatedFileOperation::writeObject().

Here is the caller graph for this function:

◆ writeObject() [1/2]

bool writeObject ( IOstreamOption  streamOpt,
const bool  valid 
) const
virtual

Write using stream options.

uncomment this if you want to write global objects on master only

bool isGlobal = global();

Reimplemented in profiling, coordinateSystems, distributedTriSurfaceMesh, objectRegistry, fvMesh, Time, polySurface, dynamicOversetFvMesh, triSurfaceMesh, surfMesh, polyBoundaryMesh, dynamicRefineFvMesh, motionSolver, rigidBodyMeshMotion, faceZoneSet, rigidBodyMeshMotionSolver, sixDoFRigidBodyMotionSolver, pointZoneSet, cellZoneSet, and decomposedBlockData.

Definition at line 37 of file regIOobjectWrite.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::fileHandler(), IOobject::instance(), Foam::name(), Foam::Pout, SeriousErrorInFunction, fileOperation::setUnmodified(), Foam::system(), timeName, and fileOperation::writeObject().

Referenced by regIOobject::write(), CompactIOField< T, BaseType >::writeObject(), cellZoneSet::writeObject(), pointZoneSet::writeObject(), faceZoneSet::writeObject(), coordinateSystems::writeObject(), profiling::writeObject(), and polyBoundaryMesh::writeObject().

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

◆ write()

bool write ( const bool  valid = true) const
virtual

◆ global()

◆ operator=()

void operator= ( const IOobject io)

Copy assignment.

Definition at line 474 of file regIOobject.C.

References IOobject::operator=().

Here is the call graph for this function:

◆ writeObject() [2/2]

bool writeObject ( IOstream::streamFormat  fmt,
IOstream::versionNumber  ver,
IOstream::compressionType  comp,
const bool  valid 
) const
virtual

Write using given format, version and compression.

Definition at line 176 of file regIOobjectWrite.C.

Friends And Related Function Documentation

◆ functionEntries::codeStream

friend class functionEntries::codeStream
friend

Friendship with classes needing access to masterOnlyReading.

Definition at line 124 of file regIOobject.H.

◆ fileOperations::uncollatedFileOperation

Definition at line 125 of file regIOobject.H.

Member Data Documentation

◆ masterOnlyReading

bool masterOnlyReading = false
staticprotected

To flag master-only reading of objects.

Definition at line 89 of file regIOobject.H.

◆ fileModificationSkew

float fileModificationSkew
static

Definition at line 133 of file regIOobject.H.

Referenced by argList::parse().

◆ maxFileModificationPolls

int maxFileModificationPolls
static

Definition at line 135 of file regIOobject.H.

Referenced by argList::parse().


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