33 #include "dcmtk/config/osconfig.h"
35 #if defined(HAVE_STL) || defined(HAVE_STL_AUTO_PTR)
38 #define OFauto_ptr std::auto_ptr
42 #define INCLUDE_CSTDDEF
43 #include "dcmtk/ofstd/ofstdinc.h"
128 T*
get()
const {
return this->
ptr; }
T * operator->() const
get the pointer that is managed by this class.
OFauto_ptr & operator=(OFauto_ptr< T > &other)
assigns the other pointer to this OFauto_ptr
T * ptr
the pointer that it's all about
OFauto_ptr_ref(T *p)
constructs a OFauto_ptr_ref from a pointer.
void reset(T *p=NULL)
assign another pointer to this OFauto_ptr, possibly deleting our current pointer. ...
T & operator*() const
get the pointer that is managed by this class.
OFauto_ptr & operator=(OFauto_ptr_ref< T > other)
assigns the other pointer to this OFauto_ptr
T * release()
release the pointer that is managed by this class.
OFauto_ptr(OFauto_ptr_ref< T > other)
constructs a OFauto_ptr from an OFauto_ptr_ref.
T * ptr
the pointer that it's all about
OFauto_ptr(T *p=NULL)
constructs a OFauto_ptr from the given pointer.
a simple class which makes sure a pointer is deleted once it goes out of scope.
internal class, don't ever use this directly! This is needed to make the following code work: ...
OFauto_ptr(OFauto_ptr< T > &other)
constructs a OFauto_ptr from another OFauto_ptr.