45 ownedByRegistry_(false),
66 ownedByRegistry_(false),
67 watchIndices_(rio.watchIndices_),
68 eventNo_(
db().getEvent())
78 ownedByRegistry_(false),
80 eventNo_(
db().getEvent())
102 ownedByRegistry_(
false),
104 eventNo_(
db().getEvent())
121 ownedByRegistry_(
false),
123 eventNo_(
db().getEvent())
136 if (objectRegistry::debug)
140 Pout<<
"Destroying objectRegistry " <<
name()
146 Pout<<
"Destroying regIOobject " <<
name()
147 <<
" in directory " <<
path()
155 if (!ownedByRegistry_)
181 <<
"failed to register object " <<
objectPath()
182 <<
" the name already exists in the objectRegistry" <<
endl 189 <<
"failed to register object " <<
objectPath()
190 <<
" the name already exists in the objectRegistry" 210 watchIndices_.
clear();
224 &&
time().runTimeModifiable()
240 <<
" already watched with index " << watchIndices_[index]
275 watchIndices_.
clear();
407 if (!ok && IOobject::debug)
410 <<
"failed to read header of file " <<
objectPath()
424 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.
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.
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.
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?
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...
#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.