41#ifndef Foam_regIOobject_H
42#define Foam_regIOobject_H
61namespace functionEntries
65namespace fileOperations
67 class uncollatedFileOperation;
99 bool ownedByRegistry_;
117 void readStream(
const bool valid);
193 inline static Type&
store(Type*
p);
223 inline static Type&
store(
tmp<Type>& ptr);
229 inline static Type&
store(
tmp<Type>&& ptr);
309 Istream& readStream(const
word&, const
bool valid = true);
354 virtual
bool write(const
bool valid = true) const;
360 virtual
bool global()
const
392#include "regIOobjectI.H"
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
The IOstreamOption is a simple container for options an IOstream can normally have.
streamFormat
Data format (ascii | binary)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
fileOperation that assumes file operations are local.
Dictionary entry that contains C++ OpenFOAM code that is compiled to generate the entry itself....
A class for managing references or pointers (no reference counting)
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
const dictionary * findMetaData() const noexcept
Return pointer to meta-data or nullptr.
bool registered() const noexcept
virtual bool writeData(Ostream &) const =0
Pure virtual writeData function.
void setUpToDate()
Set as up-to-date.
virtual bool modified() const
virtual bool global() const
Is object global.
void close()
Close Istream.
virtual fileName filePath() const
Return complete path + object name if the file exists.
virtual void updateMetaData()
Update internal meta-data (eg, prior to writing)
const labelList & watchIndices() const noexcept
Read access to file-monitoring handles.
bool ownedByRegistry() const noexcept
Is this object owned by the registry?
bool upToDate(const regIOobject &) const
Return true if up-to-date with respect to given object.
static bool masterOnlyReading
To flag master-only reading of objects.
TypeName("regIOobject")
Runtime type information.
bool headerOk()
Read and check header info. Does not check the headerClassName.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
virtual bool readIfModified()
Read object if modified (as set by call to modified)
void removeMetaData()
Remove meta-data.
label eventNo() const noexcept
Event number at last update.
virtual bool readData(Istream &)
Virtual readData function.
bool checkOut()
Remove all file watches and remove object from registry.
virtual ~regIOobject()
Destructor.
virtual void addWatch()
Add file watch on object (if registered and READ_IF_MODIFIED)
dictionary & getMetaData() noexcept
Get or create meta-data.
bool readHeaderOk(const IOstreamOption::streamFormat fmt, const word &typeName)
Helper: check readOpt flags and read if necessary.
void release(const bool unregister=false) noexcept
Set object as not ownedByRegistry.
virtual void rename(const word &newName)
Rename.
virtual bool read()
Read object.
bool checkIn()
Add object to registry, if not already registered.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Includes some standard C++ headers, defines global macros and templates used in multiple places by Op...
#define FOAM_DEPRECATED_FOR(since, replacement)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.