FreeFOAM The Cross-Platform CFD Toolkit
regIOobject Class Reference

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

#include <OpenFOAM/regIOobject.H>


Detailed Description

Inherits IOobject.

Inherited by DimensionedField< scalar, pointMesh >, DimensionedField< scalar, surfaceMesh >, DimensionedField< scalar, volMesh >, DimensionedField< symmTensor, volMesh >, DimensionedField< tensor, volMesh >, DimensionedField< Type, pointMesh >, DimensionedField< Type, surfaceMesh >, DimensionedField< Type, volMesh >, DimensionedField< vector, pointMesh >, DimensionedField< vector, volMesh >, AverageIOField< Type >, DimensionedField< Type, GeoMesh >, featureEdgeMesh, fieldDictionary, IOdictionary, IOField< Type >, IOList< T >, IOMap< T >, IOPosition< ParticleType >, IOPtrList< T >, MeshObject< Mesh, Type >, objectRegistry, PDRDragModel, polyBoundaryMesh, polyBoundaryMeshEntries, polyTopoChanger, refinementHistory, searchableSurface, SubDimensionedField< Type, GeoMesh >, surfacePatchIOList, surfZoneIOList, topoSet, UniformDimensionedField< Type >, ZoneMesh< ZoneType, MeshType >, IOField< vector >, IOList< face >, IOList< kinematicParcelInjectionData >, IOList< label >, IOList< reactingMultiphaseParcelInjectionData >, IOList< reactingParcelInjectionData >, IOPtrList< coordinateSystem >, IOPtrList< injector >, IOPtrList< MRFZone >, IOPtrList< porousZone >, IOPtrList< TimeActivatedExplicitSource< Type > >, MeshObject< fvMesh, centredCECCellToFaceStencilObject >, MeshObject< fvMesh, centredCFCCellToFaceStencilObject >, MeshObject< fvMesh, centredCFCFaceToCellStencilObject >, MeshObject< fvMesh, centredCPCCellToFaceStencilObject >, MeshObject< fvMesh, centredFECCellToFaceStencilObject >, MeshObject< fvMesh, CentredFitData< Polynomial > >, MeshObject< fvMesh, extendedLeastSquaresVectors >, MeshObject< fvMesh, FitDataType >, MeshObject< fvMesh, leastSquaresVectors >, MeshObject< fvMesh, pureUpwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, quadraticFitSnGradData >, MeshObject< fvMesh, skewCorrectionVectors >, MeshObject< fvMesh, upwindCECCellToFaceStencilObject >, MeshObject< fvMesh, upwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, upwindCPCCellToFaceStencilObject >, MeshObject< fvMesh, upwindFECCellToFaceStencilObject >, MeshObject< fvMesh, UpwindFitData< Polynomial > >, MeshObject< fvMesh, volPointInterpolation >, MeshObject< lduMesh, GAMGAgglomeration >, MeshObject< polyMesh, pointMesh >, ZoneMesh< cellZone, polyMesh >, ZoneMesh< faceZone, polyMesh >, and ZoneMesh< pointZone, polyMesh >.

+ Collaboration diagram for regIOobject:

List of all members.

Public Member Functions

 TypeName ("regIOobject")
 Runtime type information.
 regIOobject (const IOobject &, const bool isTime=false)
 Construct from IOobject. Optional flag for if IOobject is the.
 regIOobject (const regIOobject &)
 Construct as copy.
 regIOobject (const regIOobject &, bool registerCopy)
 Construct as copy, and transferring registry registration to copy.
virtual ~regIOobject ()
bool checkIn ()
 Add object to registry.
bool checkOut ()
 Remove object from registry.
bool ownedByRegistry () const
 Is this object owned by the registry?
void store ()
 Transfer ownership of this object to its registry.
void release ()
 Release ownership of this object from its registry.
label eventNo () const
 Event number at last update.
label & eventNo ()
 Event number at last update.
bool upToDate (const word &) const
 Am I uptodate with respect to other regIOobjects.
bool upToDate (const word &, const word &) const
bool upToDate (const word &, const word &, const word &) const
bool upToDate (const word &, const word &, const word &, const word &) const
void setUpToDate ()
 Flag me as up to date.
virtual void rename (const word &newName)
 Rename.
IstreamreadStream (const word &)
 Return Istream and check object type against that given.
void close ()
 Close Istream.
virtual bool readData (Istream &)
 Virtual readData function.
virtual bool read ()
 Read object.
virtual bool modified () const
 Return true if the object's file has been modified.
virtual bool readIfModified ()
 Read object if modified.
virtual bool writeData (Ostream &) const =0
 Pure virtual writaData function.
virtual bool writeObject (IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const
 Write using given format, version and compression.
virtual bool write () const
 Write using setting from DB.
void operator= (const IOobject &)
- Public Member Functions inherited from IOobject
 TypeName ("IOobject")
 Runtime type information.
 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.
 IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from name, instance, local, registry, io options.
 IOobject (const fileName &path, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
 Construct from path, registry, io options.
Foam::autoPtr< IOobjectclone () const
 Clone.
virtual ~IOobject ()
const Timetime () const
 Return time.
const objectRegistrydb () const
 Return the local objectRegistry.
const wordname () const
 Return name.
const wordheaderClassName () const
 Return name of the class name read from header.
stringnote ()
 Return non-constant access to the optional note.
const stringnote () const
 Return the optional note.
bool registerObject () const
 Register object created from this IOobject with registry if true.
readOption readOpt () const
readOptionreadOpt ()
writeOption writeOpt () const
writeOptionwriteOpt ()
const fileNamerootPath () const
const fileNamecaseName () const
const fileNameinstance () const
fileNameinstance ()
const fileNamelocal () const
fileName path () const
 Return complete path.
fileName path (const word &instance, const fileName &local="") const
 Return complete path with alternative instance and local.
fileName objectPath () const
 Return complete path + object name.
fileName filePath () const
 Return complete path + object name if the file exists.
bool readHeader (Istream &)
 Read header.
bool headerOk ()
 Read and check header info.
bool writeHeader (Ostream &) const
 Write header.
bool good () const
bool bad () const
InfoProxy< IOobjectinfo () const
 Return info proxy.

Static Public Member Functions

template<class Type >
static Type & store (Type *)
 Transfer ownership of the given object pointer to its registry.
template<class Type >
static Type & store (autoPtr< Type > &)
 Transfer ownership of the given object pointer to its registry.
- 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.
template<class Stream >
static Stream & writeBanner (Stream &os, bool noHint=false)
 Write the standard OpenFOAM file/dictionary banner.
template<class Stream >
static Stream & writeDivider (Stream &os)
 Write the standard file section divider.
template<class Stream >
static Stream & writeEndDivider (Stream &os)
 Write the standard end file divider.

Static Public Attributes

static int fileModificationSkew

Additional Inherited Members

- Public Types inherited from IOobject
enum  objectState { GOOD, BAD }
 Enumeration defining the valid states of an IOobject. More...
enum  readOption { MUST_READ, READ_IF_PRESENT, NO_READ }
 Enumeration defining the read options. More...
enum  writeOption { AUTO_WRITE = 0, NO_WRITE = 1 }
 Enumeration defining the write options. More...
- Protected Member Functions inherited from IOobject
IstreamobjectStream ()
 Construct and return an IFstream for the object.
void setBad (const string &)
 Set the object state to bad.
- Static Protected Member Functions inherited from IOobject
static const char * getBannerString (bool noHint)

Constructor & Destructor Documentation

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

Construct from IOobject. Optional flag for if IOobject is the.

top level regIOobject.

Definition at line 43 of file regIOobject.C.

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

regIOobject ( const regIOobject rio)

Construct as copy.

Definition at line 66 of file regIOobject.C.

regIOobject ( const regIOobject rio,
bool  registerCopy 
)

Construct as copy, and transferring registry registration to copy.

if registerCopy is true

Definition at line 81 of file regIOobject.C.

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

~regIOobject ( )
virtual

Definition at line 101 of file regIOobject.C.

References Foam::endl(), Foam::Info, Foam::name(), and Foam::type().


Member Function Documentation

TypeName ( "regIOobject"  )

Runtime type information.

bool checkIn ( )

Add object to registry.

Definition at line 128 of file regIOobject.C.

References Foam::abort(), polyMesh::defaultRegion, Foam::endl(), Foam::FatalError, FatalErrorIn, Foam::name(), and WarningIn.

Referenced by regIOobject::regIOobject().

bool checkOut ( )

Remove object from registry.

Definition at line 163 of file regIOobject.C.

Referenced by MeshObject< Mesh, Type >::Delete(), regIOobject::regIOobject(), and objectRegistry::~objectRegistry().

bool ownedByRegistry ( ) const
inline

Is this object owned by the registry?

Definition at line 28 of file regIOobjectI.H.

Referenced by objectRegistry::checkOut().

void store ( )
inline

Transfer ownership of this object to its registry.

Definition at line 34 of file regIOobjectI.H.

Referenced by coordinateSystems::New(), and triSurfaceMesh::setField().

Type & store ( Type *  tPtr)
inlinestatic

Transfer ownership of the given object pointer to its registry.

and return reference to object.

Definition at line 41 of file regIOobjectI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

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

Transfer ownership of the given object pointer to its registry.

and return reference to object.

Definition at line 57 of file regIOobjectI.H.

References Foam::abort(), Foam::FatalError, FatalErrorIn, and autoPtr< T >::ptr().

void release ( )
inline

Release ownership of this object from its registry.

Definition at line 76 of file regIOobjectI.H.

Foam::label eventNo ( ) const
inline

Event number at last update.

Definition at line 82 of file regIOobjectI.H.

Referenced by objectRegistry::getEvent().

Foam::label & eventNo ( )
inline

Event number at last update.

Definition at line 87 of file regIOobjectI.H.

bool upToDate ( const word a) const

Am I uptodate with respect to other regIOobjects.

Definition at line 175 of file regIOobject.C.

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

Definition at line 188 of file regIOobject.C.

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

Definition at line 206 of file regIOobject.C.

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

Definition at line 229 of file regIOobject.C.

void setUpToDate ( )

Flag me as up to date.

Definition at line 254 of file regIOobject.C.

bool readData ( Istream )
virtual

Virtual readData function.

Must be defined in derived types for which re-reading is required

Reimplemented in refinementHistory, porousZones, TimeActivatedExplicitSourceList< Type >, IOdictionary, and featureEdgeMesh.

Definition at line 138 of file regIOobjectRead.C.

bool read ( )
virtual

Read object.

Reimplemented in RASModel, incompressible::RASModel, Time, kOmegaSST, kOmegaSST, multiphaseMixture, LESModel, kOmegaSSTSAS, incompressible::LESModel, basicThermo, SpalartAllmaras, engineTime, LaunderGibsonRSTM, threePhaseMixture, realizableKE, LRR, kOmega, LienCubicKELowRe, LaunderGibsonRSTM, SpalartAllmaras, SpalartAllmaras, PDRkEpsilon, LaunderSharmaKE, realizableKE, RNGkEpsilon, SpalartAllmaras, LRR, kEpsilon, qZeta, LaunderSharmaKE, fvDOM, locDynOneEqEddy, NonlinearKEShih, radiationModel, RNGkEpsilon, LienCubicKE, phaseChangeTwoPhaseMixture, twoPhaseMixture, ePsiThermo< MixtureType >, hPsiThermo< MixtureType >, hsPsiThermo< MixtureType >, hRhoThermo< MixtureType >, hsRhoThermo< MixtureType >, hhuMixtureThermo< MixtureType >, LienLeschzinerLowRe, kEpsilon, GenSGSStress, GenEddyVisc, LamBremhorstKE, SRFModel, homogeneousDynSmagorinsky, dynOneEqEddy, mixedSmagorinsky, fvSchemes, oneEqEddy, dynOneEqEddy, GenSGSStress, hsRhoMixtureThermo< MixtureType >, hPsiMixtureThermo< MixtureType >, hsPsiMixtureThermo< MixtureType >, hRhoMixtureThermo< MixtureType >, DeardorffDiffStress, oneEqEddy, Smagorinsky, SpalartAllmarasIDDES, SchnerrSauer, DeardorffDiffStress, LRRDiffStress, lowReOneEqEddy, GenEddyVisc, spectEddyVisc, Kunz, scaleSimilarity, laminar, Smagorinsky2, Merkle, Smagorinsky, laminar, P1, solution, laminar, singlePhaseTransportModel, IOOutputFilter< OutputFilter >, rpm, tolerances, transportModel, noRadiation, and IObasicSourceList.

Definition at line 144 of file regIOobjectRead.C.

References Foam::type().

Referenced by IOPtrList< T >::IOPtrList(), IObasicSourceList::read(), tolerances::read(), singlePhaseTransportModel::read(), solution::read(), fvSchemes::read(), SRFModel::read(), radiationModel::read(), basicThermo::read(), incompressible::LESModel::read(), LESModel::read(), incompressible::RASModel::read(), and RASModel::read().

bool modified ( ) const
virtual

Return true if the object's file has been modified.

Reimplemented in objectRegistry.

Definition at line 152 of file regIOobjectRead.C.

References Foam::lastModified().

bool readIfModified ( )
virtual

Read object if modified.

Reimplemented in objectRegistry.

Definition at line 162 of file regIOobjectRead.C.

References Foam::endl(), Foam::Info, Foam::lastModified(), Foam::name(), Foam::nl, Pstream::parRun(), Foam::reduce(), and WarningIn.

virtual bool writeData ( Ostream ) const
pure virtual

Pure virtual writaData function.

Must be defined in derived types

Implemented in GeometricField< Type, PatchField, GeoMesh >, GeometricField< symmTensor, fvPatchField, volMesh >, GeometricField< tensor, fvPatchField, volMesh >, GeometricField< scalar, fvPatchField, volMesh >, GeometricField< scalar, fvsPatchField, surfaceMesh >, GeometricField< Type, fvsPatchField, surfaceMesh >, GeometricField< Type, pointPatchField, pointMesh >, GeometricField< scalar, pointPatchField, pointMesh >, GeometricField< vector, fvPatchField, volMesh >, GeometricField< vector, pointPatchField, pointMesh >, GeometricField< Type, fvPatchField, volMesh >, refinementHistory, topoSet, DimensionedField< Type, GeoMesh >, DimensionedField< tensor, volMesh >, DimensionedField< scalar, volMesh >, DimensionedField< vector, pointMesh >, DimensionedField< scalar, pointMesh >, DimensionedField< Type, volMesh >, DimensionedField< symmTensor, volMesh >, DimensionedField< scalar, surfaceMesh >, DimensionedField< vector, volMesh >, DimensionedField< Type, surfaceMesh >, DimensionedField< Type, pointMesh >, triSurfaceMesh, searchableSurfaceWithGaps, searchableBox, searchableSurfaceCollection, searchableCylinder, searchablePlate, searchableSphere, searchablePlane, objectRegistry, polyBoundaryMesh, PDRDragModel, ZoneMesh< ZoneType, MeshType >, ZoneMesh< faceZone, polyMesh >, ZoneMesh< pointZone, polyMesh >, ZoneMesh< cellZone, polyMesh >, TimeActivatedExplicitSourceList< Type >, polyTopoChanger, MeshObject< Mesh, Type >, MeshObject< polyMesh, pointMesh >, MeshObject< fvMesh, UpwindFitData< Polynomial > >, MeshObject< fvMesh, CentredFitData< Polynomial > >, MeshObject< fvMesh, skewCorrectionVectors >, MeshObject< fvMesh, centredFECCellToFaceStencilObject >, MeshObject< fvMesh, quadraticFitSnGradData >, MeshObject< fvMesh, centredCFCFaceToCellStencilObject >, MeshObject< fvMesh, upwindFECCellToFaceStencilObject >, MeshObject< fvMesh, pureUpwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, upwindCPCCellToFaceStencilObject >, MeshObject< fvMesh, upwindCECCellToFaceStencilObject >, MeshObject< fvMesh, centredCPCCellToFaceStencilObject >, MeshObject< fvMesh, upwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, leastSquaresVectors >, MeshObject< fvMesh, centredCFCCellToFaceStencilObject >, MeshObject< fvMesh, centredCECCellToFaceStencilObject >, MeshObject< fvMesh, extendedLeastSquaresVectors >, MeshObject< fvMesh, FitDataType >, MeshObject< fvMesh, volPointInterpolation >, MeshObject< lduMesh, GAMGAgglomeration >, AverageIOField< Type >, surfacePatchIOList, surfZoneIOList, UniformDimensionedField< Type >, IOdictionary, IOPtrList< T >, IOPtrList< coordinateSystem >, IOPtrList< injector >, IOPtrList< MRFZone >, IOPtrList< porousZone >, IOPtrList< TimeActivatedExplicitSource< Type > >, IOList< T >, IOMap< T >, IOList< label >, IOList< reactingParcelInjectionData >, IOList< reactingMultiphaseParcelInjectionData >, IOList< face >, IOList< kinematicParcelInjectionData >, IOPosition< ParticleType >, IOField< Type >, IOField< vector >, featureEdgeMesh, fieldDictionary, and polyBoundaryMeshEntries.

Referenced by searchableSurfaceWithGaps::writeData().

void operator= ( const IOobject io)

Reimplemented from IOobject.

Definition at line 277 of file regIOobject.C.

References IOobject::operator=().


Member Data Documentation

int fileModificationSkew
static

Definition at line 96 of file regIOobject.H.


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