33 #ifndef __H__UG__owned_pointer__
34 #define __H__UG__owned_pointer__
96 operator bool()
const {
return m_p != 0;}
Holds and automatically deletes a pointer, similar to std::auto_ptr. USE WITH CARE!
Definition: owned_pointer.h:63
TPtr m_p
Definition: owned_pointer.h:103
T * TPtr
Definition: owned_pointer.h:65
OwnedPtr & operator=(const OwnedPtr &op)
Transfers ownership of the associated object from ap to this.
Definition: owned_pointer.h:82
OwnedPtr(const OwnedPtr &op)
Transfers ownership of the associated object from ap to this.
Definition: owned_pointer.h:73
TPtr operator->() const
Definition: owned_pointer.h:91
TRef operator*() const
Definition: owned_pointer.h:92
void invalidate() const
This method is a hack, to allow that only one instance owns the pointer.
Definition: owned_pointer.h:100
TPtr & get() const
Definition: owned_pointer.h:94
OwnedPtr(TPtr p=0)
Definition: owned_pointer.h:68
void reset(TPtr p=0)
Definition: owned_pointer.h:89
T & TRef
Definition: owned_pointer.h:66