46 "fileModificationSkew",
58 ownedByRegistry_(false),
79 ownedByRegistry_(false),
80 watchIndices_(rio.watchIndices_),
81 eventNo_(
db().getEvent())
91 ownedByRegistry_(false),
93 eventNo_(
db().getEvent())
115 ownedByRegistry_(
false),
117 eventNo_(
db().getEvent())
134 ownedByRegistry_(
false),
136 eventNo_(
db().getEvent())
149 if (objectRegistry::debug)
153 Pout<<
"Destroying objectRegistry " <<
name()
159 Pout<<
"Destroying regIOobject " <<
name()
160 <<
" in directory " <<
path()
166 if (!ownedByRegistry_)
192 <<
"failed to register object " <<
objectPath()
193 <<
" the name already exists in the objectRegistry" <<
endl 200 <<
"failed to register object " <<
objectPath()
201 <<
" the name already exists in the objectRegistry" 221 watchIndices_.
clear();
237 &&
time().runTimeModifiable()
244 index = watchIndices_.
size();
258 &&
time().runTimeModifiable()
274 <<
" already watched with index " << watchIndices_[index]
309 watchIndices_.
clear();
441 if (!ok && IOobject::debug)
444 <<
"failed to read header of file " <<
objectPath()
458 void Foam::regIOobject::operator=(
const IOobject& io)
bool upToDate(const regIOobject &) const
Return true if up-to-date with respect to given object.
#define forAll(list, i)
Loop across all elements in list.
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.
float floatOptimisationSwitch(const char *name, const float defaultValue=0)
Lookup optimisation switch or add default value.
void operator=(const IOobject &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void setUpToDate()
Set up to date (obviously)
void size(const label)
Override size to be inconsistent with allocated storage.
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.
virtual void rename(const word &newName)
Rename.
static word defaultRegion
Return the default region name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool checkOut(regIOobject &) const
Remove an regIOobject from registry.
bool headerOk()
Read and check header info.
static bool master(const label communicator=0)
Am I the master process.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
virtual fileName filePath() const
Return complete path + object name if the file exists.
regIOobject(const IOobject &, const bool isTime=false)
Construct from IOobject. Optional flag for if IOobject is the.
fileName path() const
Return complete path.
fileName localFilePath(const word &typeName) const
Helper for filePath that searches locally.
void clear()
Clear the list, i.e. set size to zero.
A class for handling words, derived from string.
virtual fileName getFile(const label) const
Get name of file being watched (using handle)
void append(const T &)
Append an element at the end of the list.
label getEvent() const
Return new event number.
const fileName & local() const
label eventNo() const
Event number at last update.
const fileOperation & fileHandler()
Get current file handler.
errorManip< error > abort(error &err)
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
bool checkOut()
Remove object from registry.
registerOptSwitch("fileModificationSkew", float, Foam::regIOobject::fileModificationSkew)
defineTypeNameAndDebug(combustionModel, 0)
static fileCheckTypes fileModificationChecking
Type of file modification checking.
virtual void addWatch()
Add file watch on object (if registered and READ_IF_MODIFIED)
virtual void rename(const word &newName)
Rename.
const fileName & rootPath() const
void setSize(const label)
Reset size of List.
static bool & parRun()
Is this a parallel run?
const fileName & instance() const
#define WarningInFunction
Report a warning using Foam::Warning.
const Time & time() const
Return time.
prefixOSstream Pout(cout, "Pout")
List< Key > sortedToc() const
Return the table of contents as a sorted list.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
virtual bool global() const
Is object same for all processors.
bool checkIn(regIOobject &) const
Add an regIOobject to registry.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
static float fileModificationSkew
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
const objectRegistry & db() const
Return the local objectRegistry.
virtual label findWatch(const labelList &watchIndices, const fileName &) const
Find index (or -1) of file in list of handles.
bool & registerObject()
Register object created from this IOobject with registry if true.
readOption readOpt() const
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const fileName & caseName() const
fileName objectPath() const
Return complete path + object name.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
bool checkIn()
Add object to registry.
virtual bool removeWatch(const label) const
Remove watch on a file (using handle)
virtual bool readHeader(IOobject &, const fileName &, const word &typeName) const =0
Read object header from supplied file.
virtual ~regIOobject()
Destructor.