65 <<
"attempted copy of a deallocated temporary" 66 <<
" of type " <<
typeid(
T).
name()
84 const_cast<tmp<T>&
>(t).ptr_ = 0;
96 "Foam::tmp<T>::tmp(const tmp<T>&, bool allowTransfer)" 97 ) <<
"attempted copy of a deallocated temporary" 98 <<
" of type " <<
typeid(
T).
name()
111 if (ptr_->okToDelete())
136 return (isTmp_ && !ptr_);
143 return (!isTmp_ || (isTmp_ && ptr_));
155 <<
"temporary of type " <<
typeid(
T).
name() <<
" deallocated" 162 ptr->resetRefCount();
194 <<
"temporary of type " <<
typeid(
T).
name() <<
" deallocated" 210 return const_cast<T&
>(ref_);
222 FatalErrorIn(
"const T& Foam::tmp<T>::operator()() const")
223 <<
"temporary of type " <<
typeid(
T).
name() <<
" deallocated" 251 <<
"temporary of type " <<
typeid(
T).
name() <<
" deallocated" 259 return &
const_cast<T&
>(ref_);
267 return const_cast<tmp<T>&
>(*this).operator->();
276 if (ptr_->okToDelete())
299 <<
"attempted copy of a deallocated temporary" 300 <<
" of type " <<
typeid(
T).
name()
307 <<
"attempted to assign to a const reference to constant object" 308 <<
" of type " <<
typeid(
T).
name()
~tmp()
Destructor, delete object when reference count == 0.
T * ptr() const
Return tmp pointer for reuse.
word name(const complex &)
Return a string representation of a complex.
T & operator()()
Dereference operator.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void clear() const
If object pointer points to valid object:
bool isTmp() const
Return true if this is really a temporary object.
bool valid() const
Is this temporary object valid,.
bool empty() const
Return true if this temporary object empty,.
T * operator->()
Return object pointer.
tmp(T *=0)
Store object pointer.
void operator=(const tmp< T > &)
Assignment operator.
errorManip< error > abort(error &err)
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
A class for managing temporary objects.