Go to the documentation of this file.
33 return ownedByRegistry_;
41 ownedByRegistry_ =
true;
46 <<
"Refuse to store unregistered object: " << this->
name() <<
nl;
49 return ownedByRegistry_;
59 <<
"Object deallocated\n"
63 const bool ok =
p->regIOobject::store();
68 <<
"Failed to store pointer: " <<
p->regIOobject::name()
69 <<
". Risk of memory leakage\n"
89 return store(aptr.release());
118 <<
"Refuse to store tmp to const-ref: " <<
p->name()
119 <<
". Likely indicates a coding error\n";
136 ownedByRegistry_ =
false;
157 return watchIndices_;
163 return watchIndices_;
void release(const bool unregister=false)
Release ownership of this object from its registry.
A class for managing temporary objects.
const labelList & watchIndices() const
Return file-monitoring handles.
bool isTmp() const noexcept
True if this is a managed pointer (not a const reference)
label eventNo() const
Event number at last update.
T * get() noexcept
Return pointer without nullptr checking.
word name(const complex &c)
Return string representation of complex.
T * release() noexcept
Return pointer to the managed object and release ownership.
bool ownedByRegistry() const
Is this object owned by the registry?
errorManip< error > abort(error &err)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.