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

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

#include <scopedptr.h>

Inherits Common::ScopedPtrBase< T, Deallocator >.

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

Public Member Functions

 ScopedPtr (typename ScopedPtrBase< T, Deallocator >::PointerType o=0)
 
ScopedPtrBase< T, Deallocator >::ReferenceType operator* () const
 
ScopedPtrBase< T, Deallocator >::PointerType operator-> () const
 
- Public Member Functions inherited from Common::ScopedPtrBase< T, Deallocator >
 ScopedPtrBase (PointerType o=0)
 
XOREOS_EXPLICIT_OPERATOR_CONV operator bool () const
 Implicit conversion operator to bool for convenience, to make checks like "if (scopedPtr) ..." possible. More...
 
 ~ScopedPtrBase ()
 
void reset (PointerType o=0)
 Resets the pointer with the new value. More...
 
PointerType get () const
 Returns the plain pointer value. More...
 
PointerType release ()
 Returns the plain pointer value and releases ScopedPtr. More...
 
void swap (ScopedPtrBase< T, Deallocator > &right)
 Swap the managed pointers of two ScopedPtrs of the same type. More...
 

Additional Inherited Members

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

Detailed Description

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

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

Definition at line 120 of file scopedptr.h.

Constructor & Destructor Documentation

◆ ScopedPtr()

template<typename T, class Deallocator = DeallocatorDefault>
Common::ScopedPtr< T, Deallocator >::ScopedPtr ( typename ScopedPtrBase< T, Deallocator >::PointerType  o = 0)
inlineexplicit

Definition at line 122 of file scopedptr.h.

Member Function Documentation

◆ operator*()

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

Definition at line 126 of file scopedptr.h.

◆ operator->()

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

Definition at line 130 of file scopedptr.h.


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