DCMTK  Version 3.6.1 20170228
OFFIS DICOM Toolkit
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
OFauto_ptr_ref< T > Class Template Reference

internal class, don't ever use this directly! This is needed to make the following code work: More...

Public Member Functions

 OFauto_ptr_ref (T *p)
 constructs a OFauto_ptr_ref from a pointer. More...
 

Public Attributes

T * ptr
 the pointer that it's all about
 

Detailed Description

template<class T>
class OFauto_ptr_ref< T >

internal class, don't ever use this directly! This is needed to make the following code work:

OFauto_ptr<X> func() { return new X; }
OFauto_ptr<X> local_var = func();

The compiler will add implicit casts to OFauto_ptr_ref to make this work:

OFauto_ptr<X> func() { return OFauto_ptr_ref<X>(new X); }
OFauto_ptr<X> local_var = OFstatic_cast(OFauto_ptr_ref<X>, func());

Constructor & Destructor Documentation

template<class T>
OFauto_ptr_ref< T >::OFauto_ptr_ref ( T *  p)
inlineexplicit

constructs a OFauto_ptr_ref from a pointer.

Parameters
pthe pointer to use.

The documentation for this class was generated from the following file:


Generated on Tue Feb 28 2017 for DCMTK Version 3.6.1 20170228 by Doxygen 1.8.8