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, exprResultGlobals, fvExprDriverWriter, extendedFeatureEdgeMesh, faBoundaryMesh, featureEdgeMesh, fieldDictionary, GlobalIOField< Type >, GlobalIOList< Type >, adjointTurbulenceModel, IOList< T >, IOMap< T >, IOmapDistribute, IOmapDistributePolyMesh, IOPtrList< T >, lduPrimitiveMeshAssembly, lumpedPointIOMovement, meshObject, surfaceTensionModel, 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 isTimeObject=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...
 
const dictionaryfindMetaData () const noexcept
 Return pointer to meta-data or nullptr. More...
 
dictionarygetMetaData () noexcept
 Get or create meta-data. More...
 
void removeMetaData ()
 Remove meta-data. More...
 
virtual void updateMetaData ()
 Update internal meta-data (eg, prior to writing) 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 (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::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, bool globalObject=false)
 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 noexcept
 Return the local objectRegistry. More...
 
const Timetime () const
 Return Time associated with the objectRegistry. More...
 
const wordname () const noexcept
 Return name. More...
 
const wordheaderClassName () const noexcept
 Return name of the class name read from header. More...
 
wordheaderClassName () noexcept
 Return non-constant access to the class name read from header. More...
 
const stringnote () const noexcept
 Return the optional note. More...
 
stringnote () noexcept
 Return non-constant access to the optional note. More...
 
bool registerObject () const noexcept
 Should object created with this IOobject be registered? More...
 
bool registerObject (bool on) noexcept
 Change registration preference, return previous value. More...
 
bool globalObject () const noexcept
 Is object same for all processors? More...
 
bool globalObject (bool on) noexcept
 Change global-object status, return previous value. More...
 
unsigned labelByteSize () const noexcept
 The sizeof (label) in bytes, possibly read from the header. More...
 
unsigned scalarByteSize () const noexcept
 The sizeof (scalar) in bytes, 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 noexcept
 The read option. More...
 
readOption readOpt (readOption opt) noexcept
 Change the read option, return previous value. More...
 
writeOption writeOpt () const noexcept
 The write option. More...
 
writeOption writeOpt (writeOption opt) noexcept
 Change the write option, return previous value. 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 noexcept
 
fileNameinstance () noexcept
 
const fileNamelocal () const noexcept
 
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 objectRelPath () const
 The object path relative to the root. 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...
 
IOstreamOption parseHeader (const dictionary &headerDict)
 
bool readHeader (Istream &is)
 
bool readHeader (dictionary &headerDict, Istream &is)
 
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 with current type() More...
 
bool writeHeader (Ostream &os, const word &objectType) const
 Write header with override of type. More...
 
void writeHeader (dictionary &dict, IOstreamOption streamOpt) const
 
void writeHeader (dictionary &dict, const word &objectType, IOstreamOption streamOpt) const
 
bool good () const noexcept
 
bool bad () const noexcept
 
InfoProxy< IOobjectinfo () const
 Return info proxy. More...
 
void operator= (const IOobject &io)
 
readOptionreadOpt () noexcept
 Access to the read option. More...
 
writeOptionwriteOpt () noexcept
 Access to the write option. More...
 
boolregisterObject () noexcept
 Access to the register object option. More...
 
boolglobalObject () noexcept
 Access to the global object option. More...
 
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)
 

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 bannerEnabled () noexcept
 Status of output file banner. More...
 
static bool bannerEnabled (bool on) noexcept
 Enable/disable an output file banner. More...
 
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...
 
static word scopedName (const std::string &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, const bool noSyntaxHint=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...
 

Protected Member Functions

bool readHeaderOk (const IOstreamOption::streamFormat fmt, const word &typeName)
 Helper: check readOpt flags and read if necessary. 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...
 
- 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...
 
static float fileModificationSkew
 Time skew (seconds) for file modification checks. More...
 
static int maxFileModificationPolls
 Max number of times to poll for file modification changes. More...
 
- Static Protected Member Functions inherited from IOobject
static void writeHeaderContent (Ostream &os, const IOobject &io, const word &objectType, const dictionary *metaDataDict=nullptr)
 
static void writeHeaderContent (dictionary &dict, const IOobject &io, const word &objectType, IOstreamOption streamOpt, const dictionary *metaDataDict=nullptr)
 

Detailed Description

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

Source files

Definition at line 73 of file regIOobject.H.

Constructor & Destructor Documentation

◆ regIOobject() [1/5]

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

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

Definition at line 47 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 65 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 79 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 102 of file regIOobject.C.

◆ regIOobject() [5/5]

regIOobject ( const IOobject io,
const regIOobject rio 
)

Copy construct with new IO parameters.

Definition at line 127 of file regIOobject.C.

◆ ~regIOobject()

~regIOobject ( )
virtual

Destructor.

Definition at line 149 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 IOstreamOption::streamFormat  fmt,
const word typeName 
)
protected

Helper: check readOpt flags and read if necessary.

Definition at line 39 of file regIOobjectRead.C.

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

Here is the call graph for this function:

◆ 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 188 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 224 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 267 of file regIOobject.C.

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

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

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 codedBase::codeDict(), mappedPatchBase::constructIOField(), fvMatrix< Type >::createOrUpdateLduPrimitiveAssembly(), CrankNicolsonDdtScheme< Type >::ddt0_(), volPointInterpolation::interpolate(), lumpedPointDisplacementPointPatchVectorField::movement(), options::New(), zoneDistribute::New(), zoneCPCStencil::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 >::release(), 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 337 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 377 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 387 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 398 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 409 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 415 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:

◆ findMetaData()

const Foam::dictionary * findMetaData ( ) const
virtualnoexcept

Return pointer to meta-data or nullptr.

Reimplemented from IOobject.

Definition at line 33 of file regIOobjectMetaData.C.

◆ getMetaData()

Foam::dictionary & getMetaData ( )
noexcept

Get or create meta-data.

Definition at line 39 of file regIOobjectMetaData.C.

◆ removeMetaData()

void removeMetaData ( )

Remove meta-data.

Definition at line 49 of file regIOobjectMetaData.C.

◆ updateMetaData()

void updateMetaData ( )
virtual

Update internal meta-data (eg, prior to writing)

Definition at line 55 of file regIOobjectMetaData.C.

◆ 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 >, unwatchedIOdictionary, IOdictionary, localIOdictionary, GlobalIOField< Type >, IOMap< T >, GlobalIOField< vector >, featureEdgeMesh, GlobalIOList< Type >, GlobalIOList< reactingParcelInjectionData >, GlobalIOList< reactingMultiphaseParcelInjectionData >, and GlobalIOList< kinematicParcelInjectionData >.

Definition at line 430 of file regIOobject.C.

References Foam::type().

Referenced by rawIOField< Type >::rawIOField(), and decomposedBlockData::read().

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 436 of file regIOobject.C.

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

Referenced by extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(), featureEdgeMesh::featureEdgeMesh(), 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 129 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 171 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, basicThermo, phaseSystem, Time, refinementHistory, adjointSpalartAllmaras, schemesLookup, twoPhaseMixtureThermo, adjointRASModel, twoPhaseMixtureEThermo, solarLoad, multiphaseSystem, multiphaseMixture, laserDTRM, fvDOM, kinematicSingleLayer, incompressibleThreePhaseMixture, diffusionMulticomponent< ReactionThermo, ThermoType >, EDC< ReactionThermo >, thermoSingleLayer, crankConRod, incompressibleTwoPhaseInteractingMixture, viewFactor, solidThermo, rigidBodyMeshMotion, twoPhaseSystem, motionSolver, decomposedBlockData, solution, reactingOneDim, multiphaseSystem, engineTime, incompressibleTwoPhaseMixture, rigidBodyMeshMotionSolver, FSD< ReactionThermo, ThermoType >, combustionModel, temperaturePhaseChangeTwoPhaseMixture, SRFModel, sixDoFRigidBodyMotionSolver, interfaceHeatResistance, thermoIncompressibleTwoPhaseMixture, SIMPLEControl, adjointLaminar, regionModel, CombustionModel< ReactionThermo >, 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 191 of file regIOobjectRead.C.

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

Referenced by IOporosityModelList::read(), tolerances::read(), singlePhaseTransportModel::read(), IOMRFZoneList::read(), turbulenceModel::read(), optimisationManager::read(), regionModel::read(), SRFModel::read(), combustionModel::read(), incompressibleTwoPhaseMixture::read(), solution::read(), motionSolver::read(), twoPhaseSystem::read(), solidThermo::read(), radiationModel::read(), multiphaseSystem::read(), schemesLookup::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 243 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 237 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 251 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, faBoundaryMesh, adjointSimple, BlendedInterfacialModel< ModelType >, BlendedInterfacialModel< virtualMassModel >, BlendedInterfacialModel< Foam::wallLubricationModel >, BlendedInterfacialModel< Foam::dragModel >, BlendedInterfacialModel< liftModel >, BlendedInterfacialModel< Foam::heatTransferModel >, BlendedInterfacialModel< Foam::virtualMassModel >, BlendedInterfacialModel< Foam::liftModel >, BlendedInterfacialModel< dragModel >, BlendedInterfacialModel< Foam::turbulentDispersionModel >, BlendedInterfacialModel< heatTransferModel >, BlendedInterfacialModel< phaseTransferModel >, BlendedInterfacialModel< turbulentDispersionModel >, BlendedInterfacialModel< wallLubricationModel >, DarcyForchheimer, exprResultGlobals, decomposedBlockData, coordinateSystems, powerLaw, fixedCoeff, simple, virtualMassModel, virtualMassModel, temperatureDependent, MeshObject< fvMesh, MoveableMeshObject, FitDataType >, MeshObject< polyMesh, UpdateableMeshObject, decompositionModel >, MeshObject< polyMesh, GeometricMeshObject, meshSearchMeshObject >, MeshObject< fvMesh, TopologicalMeshObject, centredCPCCellToFaceStencilObject >, MeshObject< fvMesh, MoveableMeshObject, CentredFitData< Polynomial > >, MeshObject< polyMesh, UpdateableMeshObject, twoDPointCorrector >, MeshObject< fvMesh, UpdateableMeshObject, wallDist >, MeshObject< faMesh, Foam::MoveableMeshObject, leastSquaresFaVectors >, MeshObject< fvMesh, TopologicalMeshObject, zoneDistribute >, MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >, MeshObject< fvMesh, TopologicalMeshObject, centredCFCFaceToCellStencilObject >, MeshObject< polyMesh, GeometricMeshObject, meshSearchFACE_CENTRE_TRISMeshObject >, MeshObject< fvMesh, TopologicalMeshObject, centredCPCCellToCellStencilObject >, MeshObject< fvMesh, TopologicalMeshObject, upwindFECCellToFaceStencilObject >, MeshObject< fvMesh, TopologicalMeshObject, centredCECCellToCellStencilObject >, MeshObject< fvMesh, MoveableMeshObject, LeastSquaresVectors< Stencil > >, MeshObject< fvMesh, TopologicalMeshObject, centredCFCCellToCellStencilObject >, MeshObject< polyMesh, MoveableMeshObject, cellAspectRatio >, MeshObject< fvMesh, MoveableMeshObject, leastSquaresVectors >, MeshObject< fvMesh, Foam::GeometricMeshObject, boundaryRadiationProperties >, MeshObject< fvMesh, TopologicalMeshObject, upwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, TopologicalMeshObject, upwindCECCellToFaceStencilObject >, MeshObject< fvMesh, UpdateableMeshObject, volPointInterpolation >, MeshObject< lduMesh, GeometricMeshObject, GAMGAgglomeration >, MeshObject< fvMesh, TopologicalMeshObject, pureUpwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, TopologicalMeshObject, upwindCPCCellToFaceStencilObject >, MeshObject< fvMesh, UpdateableMeshObject, volBSplinesBase >, MeshObject< polyMesh, TopologicalMeshObject, regionSplit >, MeshObject< fvMesh, MoveableMeshObject, skewCorrectionVectors >, MeshObject< polyMesh, Foam::UpdateableMeshObject, faMesh >, MeshObject< fvMesh, TopologicalMeshObject, centredCECCellToFaceStencilObject >, MeshObject< fvMesh, MoveableMeshObject, UpwindFitData< Polynomial > >, MeshObject< fvMesh, TopologicalMeshObject, centredCFCCellToFaceStencilObject >, MeshObject< polyMesh, UpdateableMeshObject, pointMesh >, MeshObject< Time, TopologicalMeshObject, multiWorldConnections >, MeshObject< fvMesh, TopologicalMeshObject, centredFECCellToFaceStencilObject >, MeshObject< Time, TopologicalMeshObject, gravity >, MeshObject< fvMesh, MoveableMeshObject, CentredFitSnGradData< Polynomial > >, MeshObject< fvMesh, TopologicalMeshObject, zoneCPCStencil >, surfaceTensionModel, RASTurbulenceModel, liquidProperties, surfaceTensionModel, porousModel, GlobalIOField< Type >, GlobalIOField< vector >, lumpedPointIOMovement, constant, GlobalIOList< Type >, GlobalIOList< reactingParcelInjectionData >, GlobalIOList< reactingMultiphaseParcelInjectionData >, GlobalIOList< kinematicParcelInjectionData >, fvExprDriverWriter, 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, searchableBox, searchableRotatedBox, searchableCylinder, searchableDisk, searchablePlate, searchableExtrudedCircle, searchablePlane, lduPrimitiveMeshAssembly, adjointTurbulenceModel, ATCModel, objectiveManager, solver, adjointSolverManager, solutionControl, PDRDragModel, polyTopoChanger, extendedFeatureEdgeMesh, baseIOdictionary, UniformDimensionedField< Type >, UniformDimensionedField< scalar >, UniformDimensionedField< vector >, featureEdgeMesh, IOmapDistribute, polyBoundaryMeshEntries, and SLGThermo.

Referenced by uncollatedFileOperation::read(), masterUncollatedFileOperation::read(), decomposedBlockData::writeBlockEntry(), 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, faBoundaryMesh, decomposedBlockData, rigidBodyMeshMotion, motionSolver, faceZoneSet, rigidBodyMeshMotionSolver, sixDoFRigidBodyMotionSolver, pointZoneSet, and cellZoneSet.

Definition at line 36 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(), faBoundaryMesh::writeObject(), profiling::writeObject(), and polyBoundaryMesh::writeObject().

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

◆ write()

◆ global()

◆ operator=()

void operator= ( const IOobject io)

Copy assignment.

Definition at line 457 of file regIOobject.C.

References IOobject::operator=().

Here is the call graph for this function:

◆ writeObject() [2/2]

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

Write using given format, version and compression.

Definition at line 143 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 125 of file regIOobject.H.

◆ fileOperations::uncollatedFileOperation

Definition at line 126 of file regIOobject.H.

Member Data Documentation

◆ masterOnlyReading

bool masterOnlyReading = false
staticprotected

To flag master-only reading of objects.

Definition at line 87 of file regIOobject.H.


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