45 ownedByRegistry_(false),
66 ownedByRegistry_(false),
67 watchIndices_(rio.watchIndices_),
68 eventNo_(
db().getEvent())
78 ownedByRegistry_(false),
80 eventNo_(
db().getEvent())
94 ownedByRegistry_(false),
96 eventNo_(
db().getEvent())
118 ownedByRegistry_(
false),
120 eventNo_(
db().getEvent())
137 ownedByRegistry_(
false),
139 eventNo_(
db().getEvent())
152 if (objectRegistry::debug)
156 Pout<<
"Destroying objectRegistry " <<
name()
163 Pout<<
"Destroying regIOobject " <<
name()
164 <<
" in directory " <<
path()
172 if (!ownedByRegistry_)
222 <<
"failed to register object " <<
objectPath()
223 <<
" the name already exists in the objectRegistry" <<
endl 230 <<
"failed to register object " <<
objectPath()
231 <<
" the name already exists in the objectRegistry" 251 watchIndices_.
clear();
265 &&
time().runTimeModifiable()
281 <<
" already watched with index " << watchIndices_[index]
316 watchIndices_.
clear();
421 if (newName !=
name())
456 <<
"failed to read header of file " <<
objectPath()
464 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.
const word & name() const
Return name.
A class for handling file names.
void operator=(const IOobject &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void resetCacheTemporaryObject(const regIOobject &ob) const
Reset the cache state of the given object.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setUpToDate()
Set up to date (obviously)
void size(const label)
Override size to be inconsistent with allocated storage.
virtual bool globalFile() const
Return true if object is global, i.e. same for all processors.
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.
fileName objectPath() const
Return complete path + object name.
const fileName & caseName(const bool global) const
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.
fileName filePath() const
Return complete path + object name if the file exists.
fileName filePath(const word &typeName, const bool global) 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.
void clear()
Clear the list, i.e. set size to zero.
A class for handling words, derived from string.
const fileName & caseName() const
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
fileName path(const bool global) const
Return complete path including the processor sub-directory.
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.
defineTypeNameAndDebug(combustionModel, 0)
static fileCheckTypes fileModificationChecking
Type of file modification checking.
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?
#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
Return true if object is global, i.e. 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...
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
fileName & instance() const
Return the instance directory, constant, system, <time> etc.
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
fileName path() const
Return complete path.
const word & headerClassName() const
Return name of the class name read from header.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
#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.