ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Common::DisposablePtr< T, D > Class Template Reference

#include <ptr.h>

Inheritance diagram for Common::DisposablePtr< T, D >:
Collaboration diagram for Common::DisposablePtr< T, D >:

List of all members.

Public Types

typedef T ValueType
typedef T * PointerType
typedef T & ReferenceType

Public Member Functions

 DisposablePtr (PointerType o, DisposeAfterUse::Flag dispose)
 ~DisposablePtr ()
ReferenceType operator* () const
PointerType operator-> () const
bool operator_bool () const
 Implicit conversion operator to bool for convenience, to make checks like "if (scopedPtr) ..." possible.
void reset (PointerType o, DisposeAfterUse::Flag dispose)
 Resets the pointer with the new value.
void reset ()
 Clears the pointer.
PointerType get () const
 Returns the plain pointer value.

Private Attributes

PointerType _pointer
DisposeAfterUse::Flag _dispose

Detailed Description

template<typename T, class D = DefaultDeleter<T>>
class Common::DisposablePtr< T, D >

Definition at line 283 of file ptr.h.


Member Typedef Documentation

template<typename T, class D = DefaultDeleter<T>>
typedef T* Common::DisposablePtr< T, D >::PointerType

Definition at line 286 of file ptr.h.

template<typename T, class D = DefaultDeleter<T>>
typedef T& Common::DisposablePtr< T, D >::ReferenceType

Definition at line 287 of file ptr.h.

template<typename T, class D = DefaultDeleter<T>>
typedef T Common::DisposablePtr< T, D >::ValueType

Definition at line 285 of file ptr.h.


Constructor & Destructor Documentation

template<typename T, class D = DefaultDeleter<T>>
Common::DisposablePtr< T, D >::DisposablePtr ( PointerType  o,
DisposeAfterUse::Flag  dispose 
) [inline, explicit]

Definition at line 289 of file ptr.h.

template<typename T, class D = DefaultDeleter<T>>
Common::DisposablePtr< T, D >::~DisposablePtr (  )  [inline]

Definition at line 291 of file ptr.h.


Member Function Documentation

template<typename T, class D = DefaultDeleter<T>>
PointerType Common::DisposablePtr< T, D >::get (  )  const [inline]

Returns the plain pointer value.

Returns:
the pointer the DisposablePtr manages

Definition at line 325 of file ptr.h.

template<typename T, class D = DefaultDeleter<T>>
ReferenceType Common::DisposablePtr< T, D >::operator* (  )  const [inline]

Definition at line 295 of file ptr.h.

template<typename T, class D = DefaultDeleter<T>>
PointerType Common::DisposablePtr< T, D >::operator-> (  )  const [inline]

Definition at line 296 of file ptr.h.

template<typename T, class D = DefaultDeleter<T>>
bool Common::DisposablePtr< T, D >::operator_bool (  )  const [inline]

Implicit conversion operator to bool for convenience, to make checks like "if (scopedPtr) ..." possible.

Definition at line 302 of file ptr.h.

template<typename T, class D = DefaultDeleter<T>>
void Common::DisposablePtr< T, D >::reset ( PointerType  o,
DisposeAfterUse::Flag  dispose 
) [inline]

Resets the pointer with the new value.

Old object will be destroyed

Definition at line 307 of file ptr.h.

template<typename T, class D = DefaultDeleter<T>>
void Common::DisposablePtr< T, D >::reset (  )  [inline]

Clears the pointer.

Old object will be destroyed

Definition at line 316 of file ptr.h.


Member Data Documentation

template<typename T, class D = DefaultDeleter<T>>
DisposeAfterUse::Flag Common::DisposablePtr< T, D >::_dispose [private]

Definition at line 329 of file ptr.h.

template<typename T, class D = DefaultDeleter<T>>
PointerType Common::DisposablePtr< T, D >::_pointer [private]

Definition at line 328 of file ptr.h.


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


Generated on Sat Jul 13 2019 05:03:45 for ResidualVM by doxygen 1.7.1
curved edge   curved edge