67 inline explicit autoPtr(
T* =
nullptr);
87 inline bool empty()
const;
90 inline bool valid()
const;
104 inline void reset(
T* =
nullptr);
126 inline operator const T&()
const;
T & operator*()
Return reference to the object data.
void reset(T *=nullptr)
If object pointer already set, delete object and set to given.
T * ptr()
Return object pointer for reuse.
bool empty() const
Return true if the autoPtr is empty (ie, no pointer set)
void clear()
Delete object (if the pointer is valid) and set pointer to.
autoPtr(T *=nullptr)
Store object pointer.
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void operator=(T *)
Take over the object pointer from parameter.
~autoPtr()
Destructor, delete object if pointer is not nullptr.
T * operator->()
Return object pointer.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
T & operator()()
Return reference to the object data.