A class for managing temporary objects without reference counting. More...
Classes | |
class | refCount |
Public Member Functions | |
tmpNrc (T *=0) | |
Store object pointer. More... | |
tmpNrc (const T &) | |
Store object const reference. More... | |
tmpNrc (const tmpNrc< T > &) | |
Construct copy and increment reference count. More... | |
tmpNrc (const tmpNrc< T > &, bool allowTransfer) | |
Construct copy transferring content of temporary if required. More... | |
~tmpNrc () | |
Destructor: deletes temporary object when the reference count is 0. More... | |
bool | isTmp () const |
Return true if this is really a temporary object. More... | |
bool | empty () const |
Return true if this temporary object empty,. More... | |
bool | valid () const |
Is this temporary object valid,. More... | |
word | typeName () const |
Return the type name of the tmpNrc. More... | |
T & | ref () |
Return non-const reference or generate a fatal error. More... | |
T * | ptr () const |
Return tmpNrc pointer for reuse. More... | |
void | clear () const |
If object pointer points to valid object: More... | |
const T & | operator() () const |
Const dereference operator. More... | |
operator const T & () const | |
Const cast to the underlying type reference. More... | |
T * | operator-> () |
Return object pointer. More... | |
const T * | operator-> () const |
Return const object pointer. More... | |
void | operator= (T *) |
Assignment to pointer changing this tmpNrc to a temporary T. More... | |
void | operator= (const tmpNrc< T > &) |
Assignment transferring the temporary T to this tmpNrc. More... | |
A class for managing temporary objects without reference counting.
Store object pointer.
Definition at line 32 of file tmpNrcI.H.
Referenced by tmpNrc< T >::refCount::refCount().
|
inline |
Destructor: deletes temporary object when the reference count is 0.
Definition at line 99 of file tmpNrcI.H.
Referenced by tmpNrc< T >::refCount::refCount().
|
inline |
Return true if this is really a temporary object.
Definition at line 108 of file tmpNrcI.H.
Referenced by tmpNrc< Foam::fluidThermo >::operator=(), and tmpNrc< T >::refCount::refCount().
|
inline |
Return true if this temporary object empty,.
ie, a temporary without allocation
Definition at line 115 of file tmpNrcI.H.
Referenced by tmpNrc< T >::refCount::refCount().
|
inline |
Is this temporary object valid,.
ie, it is a reference or a temporary that has been allocated
Definition at line 122 of file tmpNrcI.H.
Referenced by tmpNrc< T >::refCount::refCount().
|
inline |
Return the type name of the tmpNrc.
constructed from the type name of T
Definition at line 129 of file tmpNrcI.H.
Referenced by tmpNrc< T >::refCount::refCount().
|
inline |
Return non-const reference or generate a fatal error.
if the object is const.
Definition at line 136 of file tmpNrcI.H.
Referenced by tmpNrc< T >::refCount::refCount(), nearest::srcWeights(), nearest::tgtWeights(), and patchToPatch::update().
|
inline |
Return tmpNrc pointer for reuse.
Returns a clone if the object is not a temporary
Definition at line 160 of file tmpNrcI.H.
Referenced by tmpNrc< T >::refCount::refCount().
|
inline |
If object pointer points to valid object:
delete object and set pointer to nullptr
Definition at line 184 of file tmpNrcI.H.
Referenced by tmpNrc< T >::refCount::refCount().
|
inline |
Const dereference operator.
Definition at line 197 of file tmpNrcI.H.
Referenced by tmpNrc< T >::refCount::refCount().
|
inline |
|
inline |
Return object pointer.
Definition at line 222 of file tmpNrcI.H.
Referenced by tmpNrc< T >::refCount::refCount().
|
inline |
|
inline |
Assignment to pointer changing this tmpNrc to a temporary T.
Definition at line 259 of file tmpNrcI.H.
Referenced by tmpNrc< T >::refCount::refCount().