35 #ifndef objectRegistry_H 36 #define objectRegistry_H 76 mutable bool cacheTemporaryObjectsSet_;
88 bool parentNotTime()
const;
91 void readCacheTemporaryObjects()
const;
94 void deleteCachedObject(
regIOobject& cachedOb)
const;
110 const label nIoObjects = 128
118 const label nIoObjects = 128
180 const bool forceCreate =
false 234 template<
class Object>
A HashTable with keys but without contents.
bool cacheTemporaryObject(const word &name) const
Return true if given name is in the cacheTemporaryObjects set.
void addTemporaryObject(const word &name) const
Add the given name to the set of temporary objects to cache.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
A class for handling file names.
void readModifiedObjects()
Read the objects that have been modified.
const objectRegistry & thisDb() const
Return the object registry.
void resetCacheTemporaryObject(const regIOobject &ob) const
Reset the cache state of the given object.
Type & lookupObjectRef(const word &name) const
Lookup and return the object reference of the given Type.
wordList names() const
Return the list of names of the IOobjects.
virtual bool modified() const
Return true if any of the object's files have been modified.
void operator=(const objectRegistry &)=delete
Disallow default bitwise assignment.
bool foundObject(const word &name) const
Is the named Type found?
const objectRegistry & parent() const
Return the parent objectRegistry.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
objectRegistry(const Time &db, const label nIoObjects=128)
Construct the time objectRegistry given an initial estimate.
A class for handling words, derived from string.
virtual bool writeData(Ostream &) const
writeData function required by regIOobject but not used
wordList sortedNames() const
Return the sorted list of names of the IOobjects.
virtual ~objectRegistry()
Destructor.
label getEvent() const
Return new event number.
streamFormat
Enumeration for the format of data in the stream.
virtual bool readIfModified()
Read object if modified.
An STL-conforming hash table.
A wordRe is a word, but can also have a regular expression for matching words.
bool checkCacheTemporaryObjects() const
Check that all objects in the cacheTemporaryObjects set.
compressionType
Enumeration for the format of data in the stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool checkOut()
Remove object from registry.
TypeName("objectRegistry")
Declare type name for this IOobject.
const Time & time() const
Return time.
void clear()
Remove all regIOobject owned by the registry.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
const objectRegistry & subRegistry(const word &name, const bool forceCreate=false) const
Lookup and return a const sub-objectRegistry. Optionally create.
virtual const fileName & dbDir() const
Local directory path of this objectRegistry relative to the time.
virtual bool write(const bool write=true) const
Write using setting from DB.
Registry of regIOobjects.
const objectRegistry & db() const
Return the local objectRegistry.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write) const
Write the objects.
HashTable< const Type * > lookupClass(const bool strict=false) const
Lookup and return all objects of the given Type.
bool checkIn()
Add object to registry.
virtual void rename(const word &newName)
Rename.