xoreos  0.0.5
Public Member Functions | List of all members
Common::DisposablePtr< T, Deallocator > Class Template Reference

A disposable plain pointer, allowing pointer-y access and normal deletion. More...

#include <disposableptr.h>

Inheritance diagram for Common::DisposablePtr< T, Deallocator >:
Inheritance graph
[legend]
Collaboration diagram for Common::DisposablePtr< T, Deallocator >:
Collaboration graph
[legend]

Public Member Functions

 DisposablePtr (typename DisposablePtrBase< T, Deallocator >::PointerType o, bool d)
 
DisposablePtrBase< T, Deallocator >::ReferenceType operator* () const
 
DisposablePtrBase< T, Deallocator >::PointerType operator-> () const
 
- Public Member Functions inherited from Common::DisposablePtrBase< T, Deallocator >
 DisposablePtrBase (PointerType o, bool d)
 
XOREOS_EXPLICIT_OPERATOR_CONV operator bool () const
 Implicit conversion operator to bool for convenience, to make checks like "if (disposablePtr) ..." possible. More...
 
 ~DisposablePtrBase ()
 
void reset (PointerType o=0)
 Resets the pointer with the new value. More...
 
PointerType get () const
 Returns the plain pointer value. More...
 
void setDisposable (bool d)
 Change the disposable flag. More...
 
void dispose ()
 Unconditionally dispose of the pointer, destroying the old object. More...
 

Additional Inherited Members

- Public Types inherited from Common::DisposablePtrBase< T, Deallocator >
typedef T ValueType
 
typedef T * PointerType
 
typedef T & ReferenceType
 

Detailed Description

template<typename T, class Deallocator = DeallocatorDefault>
class Common::DisposablePtr< T, Deallocator >

A disposable plain pointer, allowing pointer-y access and normal deletion.

Definition at line 117 of file disposableptr.h.

Constructor & Destructor Documentation

◆ DisposablePtr()

template<typename T, class Deallocator = DeallocatorDefault>
Common::DisposablePtr< T, Deallocator >::DisposablePtr ( typename DisposablePtrBase< T, Deallocator >::PointerType  o,
bool  d 
)
inlineexplicit

Definition at line 119 of file disposableptr.h.

Member Function Documentation

◆ operator*()

template<typename T, class Deallocator = DeallocatorDefault>
DisposablePtrBase<T, Deallocator>::ReferenceType Common::DisposablePtr< T, Deallocator >::operator* ( ) const
inline

Definition at line 123 of file disposableptr.h.

◆ operator->()

template<typename T, class Deallocator = DeallocatorDefault>
DisposablePtrBase<T, Deallocator>::PointerType Common::DisposablePtr< T, Deallocator >::operator-> ( ) const
inline

Definition at line 127 of file disposableptr.h.


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