Registry of regIOobjects. More...
#include <OpenFOAM/objectRegistry.H>
Inheritance diagram for objectRegistry:
Collaboration diagram for objectRegistry:Public Member Functions | |
| TypeName ("objectRegistry") | |
| Declare type name for this IOobject. | |
| objectRegistry (const Time &db, const label nIoObjects=128) | |
| Construct the time objectRegistry given an initial estimate. | |
| objectRegistry (const IOobject &io, const label nIoObjects=128) | |
| Construct a sub-registry given an IObject to describe the registry. | |
| virtual | ~objectRegistry () |
| const Time & | time () const |
| Return time. | |
| const objectRegistry & | parent () const |
| Return the parent objectRegistry. | |
| virtual const fileName & | dbDir () const |
| Local directory path of this objectRegistry relative to the time. | |
| wordList | names () const |
| Return the list of names of the IOobjects. | |
| wordList | names (const word &className) const |
| Return the list of names of the IOobjects of given class name. | |
| template<class Type > | |
| wordList | names () const |
| Return the list of names of the IOobjects of given type. | |
| const objectRegistry & | subRegistry (const word &name) const |
| Lookup and return a const sub-objectRegistry. | |
| template<class Type > | |
| HashTable< const Type * > | lookupClass () const |
| Lookup and return all the object of the given Type. | |
| template<class Type > | |
| bool | foundObject (const word &name) const |
| Is the named Type. | |
| template<class Type > | |
| const Type & | lookupObject (const word &name) const |
| Lookup and return the object of the given Type. | |
| label | getEvent () const |
| Return new event number. | |
| virtual void | rename (const word &newName) |
| Rename. | |
| bool | checkIn (regIOobject &) const |
| Add an regIOobject to registry. | |
| bool | checkOut (regIOobject &) const |
| Remove an regIOobject from registry. | |
| virtual bool | modified () const |
| Return true if any of the object's files have been modified. | |
| void | readModifiedObjects () |
| Read the objects that have been modified. | |
| virtual bool | readIfModified () |
| Read object if modified. | |
| virtual bool | writeData (Ostream &) const |
| writeData function required by regIOobject but not used | |
| virtual bool | writeObject (IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const |
| Write the objects. | |
Public Member Functions inherited from regIOobject | |
| 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. | |
| Istream & | readStream (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 | 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 ®istry, 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 ®istry, 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 ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
| Construct from path, registry, io options. | |
| Foam::autoPtr< IOobject > | clone () const |
| Clone. | |
| virtual | ~IOobject () |
| const objectRegistry & | db () const |
| Return the local objectRegistry. | |
| const word & | name () const |
| Return name. | |
| const word & | headerClassName () const |
| Return name of the class name read from header. | |
| string & | note () |
| Return non-constant access to the optional note. | |
| const string & | note () const |
| Return the optional note. | |
| bool | registerObject () const |
| Register object created from this IOobject with registry if true. | |
| readOption | readOpt () const |
| readOption & | readOpt () |
| writeOption | writeOpt () const |
| writeOption & | writeOpt () |
| const fileName & | rootPath () const |
| const fileName & | caseName () const |
| const fileName & | instance () const |
| fileName & | instance () |
| const fileName & | local () 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< IOobject > | info () const |
| Return info proxy. | |
Public Member Functions inherited from HashTable< regIOobject * > | |
| bool | set (const word &, const regIOobject *&newElmt) |
| Assign a new hashedEntry, overwriting existing entries. | |
| HashTable (const label size=128) | |
| Construct given initial table size. | |
| HashTable (Istream &, const label size=128) | |
| Construct from Istream. | |
| HashTable (const HashTable< regIOobject *, word, string::hash > &) | |
| Construct as copy. | |
| HashTable (const Xfer< HashTable< regIOobject *, word, string::hash > > &) | |
| Construct by transferring the parameter contents. | |
| ~HashTable () | |
| label | size () const |
| Return number of elements in table. | |
| bool | empty () const |
| Return true if the hash table is empty. | |
| bool | found (const word &) const |
| Return true if hashedEntry is found in table. | |
| iterator | find (const word &) |
| Find and return an iterator set at the hashedEntry. | |
| const_iterator | find (const word &) const |
| Find and return an const_iterator set at the hashedEntry. | |
| List< word > | toc () const |
| Return the table of contents. | |
| List< word > | sortedToc () const |
| Return the table of contents as a sorted list. | |
| Ostream & | printInfo (Ostream &) const |
| Print information. | |
| bool | insert (const word &, const regIOobject *&newElmt) |
| Insert a new hashedEntry. | |
| bool | erase (const iterator &) |
| Erase an hashedEntry specified by given iterator. | |
| bool | erase (const word &) |
| Erase an hashedEntry specified by given key if in table. | |
| label | erase (const UList< word > &) |
| Remove entries given by the listed keys from this HashTable. | |
| label | erase (const HashTable< AnyType, word, AnyHash > &) |
| Remove entries given by the given keys from this HashTable. | |
| void | resize (const label newSize) |
| Resize the hash table for efficiency. | |
| void | clear () |
| Clear all entries from table. | |
| void | clearStorage () |
| Clear the table entries and the table itself. | |
| void | transfer (HashTable< regIOobject *, word, string::hash > &) |
| Transfer the contents of the argument table into this table. | |
| Xfer< HashTable< regIOobject *, word, string::hash > > | xfer () |
| Transfer contents to the Xfer container. | |
| regIOobject *& | operator[] (const word &) |
| Find and return an hashedEntry. | |
| const regIOobject *& | operator[] (const word &) const |
| Find and return an hashedEntry. | |
| regIOobject *& | operator() (const word &) |
| Find and return an hashedEntry, create it null if not present. | |
| void | operator= (const HashTable< regIOobject *, word, string::hash > &) |
| Assignment. | |
| bool | operator== (const HashTable< regIOobject *, word, string::hash > &) const |
| Equality. Two hash tables are equal if all contents of first are. | |
| bool | operator!= (const HashTable< regIOobject *, word, string::hash > &) const |
| The opposite of the equality operation. Takes linear time. | |
| iterator | begin () |
| iterator set to the begining of the HashTable | |
| const_iterator | begin () const |
| const_iterator set to the beginning of the HashTable | |
| const iterator & | end () |
| iterator set to beyond the end of the HashTable | |
| const const_iterator & | end () const |
| const_iterator set to beyond the end of the HashTable | |
| const_iterator | cbegin () const |
| const_iterator set to the beginning of the HashTable | |
| const const_iterator & | cend () const |
| const_iterator set to beyond the end of the HashTable | |
Additional Inherited Members | |
Public Types inherited from HashTable< regIOobject * > | |
| typedef regIOobject * | value_type |
| Type of values the HashTable contains. | |
| typedef regIOobject *& | reference |
| Type that can be used for storing into HashTable::value_type. | |
| typedef const regIOobject *& | const_reference |
| Type that can be used for storing into constant. | |
| typedef label | size_type |
| The type that can represent the size of a HashTable. | |
Static Public Member Functions inherited from regIOobject | |
| 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 inherited from regIOobject | |
| static int | fileModificationSkew |
|
explicit |
Construct the time objectRegistry given an initial estimate.
for the number of entries
Definition at line 37 of file objectRegistry.C.
|
explicit |
Construct a sub-registry given an IObject to describe the registry.
and an initial estimate for the number of entries
Definition at line 64 of file objectRegistry.C.
|
virtual |
Definition at line 82 of file objectRegistry.C.
References HashTable< regIOobject * >::begin(), regIOobject::checkOut(), HashTable< regIOobject * >::end(), HashTable< regIOobject * >::iterator, and HashTable< regIOobject * >::size().
| TypeName | ( | "objectRegistry" | ) |
Declare type name for this IOobject.
|
inline |
Return time.
Reimplemented from IOobject.
Reimplemented in fvMesh.
Definition at line 114 of file objectRegistry.H.
Referenced by fieldMinMax::calcMinMaxFields(), fieldAverage::calculateMeanFields(), errorDrivenRefinement::changeTopology(), displacementFvMotionSolver::displacementFvMotionSolver(), displacementInterpolationFvMotionSolver::displacementInterpolationFvMotionSolver(), spray::inject(), IOobjectList::IOobjectList(), meshRefinement::makeDisplacementField(), trackedParticle::move(), solidParticle::move(), DsmcParcel< ParcelType >::move(), molecule::move(), KinematicParcel< ParcelType >::move(), motionSolver::New(), polyMesh::polyMesh(), Foam::polyMeshZipUpCells(), directMappedPatchBase::sampleMesh(), triSurfaceMesh::setField(), errorDrivenRefinement::setRefinement(), IOobject::time(), oscillatingDisplacementPointPatchVectorField::updateCoeffs(), oscillatingVelocityPointPatchVectorField::updateCoeffs(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), angularOscillatingDisplacementPointPatchVectorField::updateCoeffs(), angularOscillatingVelocityPointPatchVectorField::updateCoeffs(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), surfaceDisplacementPointPatchVectorField::updateCoeffs(), polyMesh::updateMesh(), and molecule::writeFields().
|
inline |
Return the parent objectRegistry.
Definition at line 120 of file objectRegistry.H.
|
inlinevirtual |
Local directory path of this objectRegistry relative to the time.
Reimplemented in polyMesh, and Time.
Definition at line 126 of file objectRegistry.H.
Referenced by polyMesh::dbDir(), IOobjectList::IOobjectList(), and surfMesh::surfMesh().
| Foam::wordList names | ( | ) | const |
Return the list of names of the IOobjects.
Definition at line 104 of file objectRegistry.C.
| Foam::wordList names | ( | const word & | className | ) | const |
Return the list of names of the IOobjects of given class name.
Definition at line 118 of file objectRegistry.C.
References ClassName, and List< T >::setSize().
| wordList names | ( | ) | const |
Return the list of names of the IOobjects of given type.
| const Foam::objectRegistry & subRegistry | ( | const word & | name | ) | const |
Lookup and return a const sub-objectRegistry.
Definition at line 138 of file objectRegistry.C.
References Foam::name().
| Foam::HashTable< const Type * > lookupClass | ( | ) | const |
Lookup and return all the object of the given Type.
Definition at line 54 of file objectRegistryTemplates.C.
References HashTable< T, Key, Hash >::insert(), and Foam::name().
Referenced by Foam::mapClouds().
| bool foundObject | ( | const word & | name | ) | const |
Is the named Type.
Definition at line 75 of file objectRegistryTemplates.C.
References Foam::name().
Referenced by fieldMinMax::calcMinMaxFields(), errorDrivenRefinement::changeTopology(), forces::devRhoReff(), greyMeanAbsorptionEmission::greyMeanAbsorptionEmission(), MeshObjectMovePoints(), layeredEngineMesh::move(), fvMotionSolverEngineMesh::move(), coordinateSystems::New(), GAMGAgglomeration::New(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), polyMesh::updateMesh(), cellSource::validField(), faceSource::validField(), and wideBandAbsorptionEmission::wideBandAbsorptionEmission().
| const Type & lookupObject | ( | const word & | name | ) | const |
Lookup and return the object of the given Type.
Definition at line 107 of file objectRegistryTemplates.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, Foam::name(), and Foam::nl.
Referenced by fieldMinMax::calcMinMaxFields(), fieldAverage::calculateMeanFields(), motionDirectionalDiffusivity::correct(), forces::devRhoReff(), wideBandAbsorptionEmission::ECont(), greyMeanAbsorptionEmission::greyMeanAbsorptionEmission(), MeshObjectMovePoints(), layeredEngineMesh::move(), fvMotionSolverEngineMesh::move(), solidParticleCloud::move(), coordinateSystems::New(), GAMGAgglomeration::New(), directMappedPatchBase::sampleMesh(), searchableSurfaceCollection::searchableSurfaceCollection(), searchableSurfaceWithGaps::searchableSurfaceWithGaps(), errorDrivenRefinement::setRefinement(), directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs(), directMappedFixedValueFvPatchField< Type >::updateCoeffs(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), epsilonWallFunctionFvPatchScalarField::updateCoeffs(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), omegaWallFunctionFvPatchScalarField::updateCoeffs(), polyMesh::updateMesh(), and wideBandAbsorptionEmission::wideBandAbsorptionEmission().
| Foam::label getEvent | ( | ) | const |
Return new event number.
Definition at line 146 of file objectRegistry.C.
References Foam::endl(), regIOobject::eventNo(), Foam::Pout, and WarningIn.
|
virtual |
Rename.
Reimplemented from regIOobject.
Definition at line 248 of file objectRegistry.C.
References regIOobject::rename(), and string::replace().
| bool checkIn | ( | regIOobject & | io | ) | const |
Add an regIOobject to registry.
Definition at line 182 of file objectRegistry.C.
References Foam::endl(), HashTable< T, Key, Hash >::insert(), Foam::name(), IOobject::name(), and Foam::Pout.
| bool checkOut | ( | regIOobject & | io | ) | const |
Remove an regIOobject from registry.
Definition at line 195 of file objectRegistry.C.
References Foam::endl(), HashTable< T, Key, Hash >::erase(), HashTable< T, Key, Hash >::find(), Foam::name(), IOobject::name(), regIOobject::ownedByRegistry(), Foam::Pout, and WarningIn.
Referenced by fieldAverage::resetFields().
|
virtual |
Return true if any of the object's files have been modified.
Reimplemented from regIOobject.
Definition at line 266 of file objectRegistry.C.
Referenced by Time::readModifiedObjects().
| void readModifiedObjects | ( | ) |
Read the objects that have been modified.
Reimplemented in Time.
Definition at line 280 of file objectRegistry.C.
References Foam::endl(), Foam::name(), and Foam::Pout.
Referenced by Time::readModifiedObjects().
|
virtual |
Read object if modified.
Reimplemented from regIOobject.
Definition at line 297 of file objectRegistry.C.
|
inlinevirtual |
writeData function required by regIOobject but not used
for this class, write is used instead
Implements regIOobject.
Reimplemented in triSurfaceMesh.
Definition at line 188 of file objectRegistry.H.
References notImplemented.
|
virtual |
Write the objects.
Reimplemented from regIOobject.
Reimplemented in distributedTriSurfaceMesh, Time, Cloud< ParticleType >, Cloud< BasicReactingMultiphaseParcel< ThermoType > >, Cloud< basicThermoParcel >, Cloud< indexedParticle >, Cloud< trackedParticle >, Cloud< ParcelType >, Cloud< parcel >, Cloud< basicKinematicParcel >, Cloud< solidParticle >, Cloud< CoalParcel< ThermoType > >, Cloud< molecule >, Cloud< passiveParticle >, Cloud< dsmcParcel >, Cloud< BasicReactingParcel< ThermoType > >, triSurfaceMesh, and dynamicRefineFvMesh.
Definition at line 305 of file objectRegistry.C.
References Foam::endl(), Foam::name(), and Foam::Pout.
Referenced by meshReader::writeMesh(), Time::writeObject(), and fvMesh::writeObjects().