43 ptr_(const_cast<
T*>(&tRef))
62 <<
"Attempted copy of a deallocated " <<
typeName()
124 return (isTmp() && !ptr_);
131 return (!isTmp() || (isTmp() && ptr_));
138 return "tmpNrc<" +
word(
typeid(
T).
name()) +
'>';
150 << typeName() <<
" deallocated"
157 <<
"Attempt to acquire non-const reference to const object"
158 <<
" from a " << typeName()
174 << typeName() <<
" deallocated"
185 return ptr_->clone().ptr();
211 << typeName() <<
" deallocated"
236 << typeName() <<
" deallocated"
243 <<
"Attempt to cast const object to non-const for a " << typeName()
254 if (isTmp() && !ptr_)
257 << typeName() <<
" deallocated"
273 <<
"Attempted copy of a deallocated " << typeName()
294 <<
"Attempted assignment to a deallocated " << typeName()
304 <<
"Attempted assignment to a const reference to an object"
305 <<
" of type " <<
typeid(
T).
name()
A class for managing temporary objects without reference counting.
void operator=(T *)
Assignment to pointer changing this tmpNrc to a temporary T.
bool valid() const
Is this temporary object valid,.
T & ref()
Return non-const reference or generate a fatal error.
T * operator->()
Return object pointer.
word typeName() const
Return the type name of the tmpNrc.
~tmpNrc()
Destructor: deletes object if it is temporary.
bool empty() const
Return true if this temporary object empty,.
bool isTmp() const
Return true if this is really a temporary object.
tmpNrc(T *=0)
Store object pointer.
T * ptr() const
Return tmpNrc pointer for reuse.
void clear() const
If object pointer points to valid object:
const T & operator()() const
Const dereference operator.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManip< error > abort(error &err)
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.