|
| smart_ptr () |
| Default initialization to null. More...
|
|
| smart_ptr (T *data) |
| Constructor which takes ownership of the provided pointer. More...
|
|
template<class R > |
| smart_ptr (smart_ptr< R > other) |
| Conversion constructor to simplify type casting. More...
|
|
| smart_ptr (const smart_ptr &other) |
| Copy constructor of the smart pointer. Internally uses clone (if available) or copy constructor of the managed resource. More...
|
|
| smart_ptr (smart_ptr &&other) noexcept |
| Move constructor of the smart pointer. Passes ownership of the managed resource from source to constructed instance. More...
|
|
| ~smart_ptr () noexcept |
| The destructor of the shared pointer, responsible for freeing the managed resource. More...
|
|
smart_ptr & | operator= (const smart_ptr &other) |
| Copy operator of assignment. Internally uses clone (if available) or copy constructor of the managed resource. More...
|
|
smart_ptr & | operator= (smart_ptr &&other) noexcept |
| Copy operator of assignment. Passes ownership of the managed resource from source to this instance. More...
|
|
T * | operator-> () |
| Operator arrow to chain dereferece to inner managed pointer. More...
|
|
T * | operator-> () const |
| Operator arrow to chain dereferece to inner managed pointer. More...
|
|
T & | operator* () |
| Operator dereference to access the inner managed pointer. More...
|
|
T & | operator* () const |
| Operator dereference to access the inner managed pointer. More...
|
|
T * | get () |
| Getter of the raw managed pointer. More...
|
|
T * | get () const |
| Getter of the raw managed pointer. More...
|
|
T * | release () |
| Releases the shared resource and returns it. More...
|
|
| operator bool () const |
| Tests the instance whether the managed pointer is valid. More...
|
|
template<class T>
class ext::smart_ptr< T >
Managed pointer simulating value like behavior.
The class is supposed to be similar to unique_ptr but allows copying of managed instance by clone method or its copy constructor.
- Template Parameters
-
T | type of managed instance |