A pointer with a reference counter. More...
#include <smart_ptr.hpp>
Public Types | |
typedef T | value_type |
The type of the pointed data. | |
typedef smart_ptr< value_type > | self_type |
The type of the current class. | |
typedef T & | reference |
Reference on the type of the stored data. | |
typedef T * | pointer |
Pointer on the type of the stored data. | |
typedef const T & | const_reference |
Constant reference on the type of the stored data. | |
typedef const T *const | const_pointer |
Constant pointer on the type of the stored data. | |
Public Member Functions | |
smart_ptr (pointer data) | |
smart_ptr (const self_type &that) | |
self_type & | operator= (const self_type &that) |
bool | operator== (const self_type &that) const |
bool | operator!= (const self_type &that) const |
bool | operator< (const self_type &that) const |
bool | operator<= (const self_type &that) const |
bool | operator> (const self_type &that) const |
bool | operator>= (const self_type &that) const |
pointer | operator-> () |
pointer | operator-> () const |
reference | operator* () |
reference | operator* () const |
A pointer with a reference counter.
Smart pointers allow the user to stop caring about the release of dynamically allocated memory. When no more pointers point to the allocated memory, this memory is released.
Template parameters:
Definition at line 51 of file smart_ptr.hpp.
typedef const T* const claw::memory::smart_ptr< T >::const_pointer |
Constant pointer on the type of the stored data.
Definition at line 70 of file smart_ptr.hpp.
typedef const T& claw::memory::smart_ptr< T >::const_reference |
Constant reference on the type of the stored data.
Definition at line 67 of file smart_ptr.hpp.
typedef T* claw::memory::smart_ptr< T >::pointer |
Pointer on the type of the stored data.
Definition at line 64 of file smart_ptr.hpp.
typedef T& claw::memory::smart_ptr< T >::reference |
Reference on the type of the stored data.
Definition at line 61 of file smart_ptr.hpp.
typedef smart_ptr<value_type> claw::memory::smart_ptr< T >::self_type |
The type of the current class.
Definition at line 58 of file smart_ptr.hpp.
typedef T claw::memory::smart_ptr< T >::value_type |
The type of the pointed data.
Definition at line 55 of file smart_ptr.hpp.