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