Public Types |
Public Member Functions |
Protected Member Functions |
Protected Attributes |
Friends |
List of all members
mn::pointer::basic_linked_ptr< T > Class Template Reference
This class implements a basic_linked_ptr template that it allows sharing of pointers between instances via reference counting. basic_linked_ptr objects can safely be copied. More...
#include <mn_linked_ptr.hpp>
Inheritance diagram for mn::pointer::basic_linked_ptr< T >:
Collaboration diagram for mn::pointer::basic_linked_ptr< T >:
Public Types | |
using | self_type = basic_linked_ptr< T > |
using | value_type = T |
using | element_type = T |
using | reference = T & |
using | pointer = T * |
using | base_type = basic_linked_ptr_node |
Public Member Functions | |
basic_linked_ptr () | |
Construct a new basic linked ptr object. More... | |
basic_linked_ptr (pointer pValue) | |
Construct,. More... | |
basic_linked_ptr (const basic_linked_ptr &_pPtr) | |
template<typename U > | |
basic_linked_ptr (const basic_linked_ptr< U > &_pPtr) | |
~basic_linked_ptr () | |
void | reset () |
pointer | get () |
void | force_delete () |
int | count () const |
Returns the use count of the shared pointer. More... | |
pointer | detach () |
bool | unique () |
If the use count of the owned pointer. More... | |
basic_linked_ptr & | operator= (const basic_linked_ptr &_pPtr) |
reference | operator* () |
pointer | operator-> () |
operator bool () | |
template<typename U > | |
void | reset (U *pValue) |
template<typename U > | |
basic_linked_ptr & | operator= (const basic_linked_ptr< U > &_pPtr) |
template<typename U > | |
basic_linked_ptr & | operator= (U *pValue) |
Protected Member Functions | |
template<typename U > | |
void | link (const basic_linked_ptr< U > &pOther) |
Protected Attributes | |
pointer | m_pValue |
Friends | |
template<typename U > | |
class | basic_linked_ptr |
Additional Inherited Members | |
Public Attributes inherited from mn::pointer::basic_linked_ptr_node | |
basic_linked_ptr_node * | Prev |
basic_linked_ptr_node * | Next |
Detailed Description
template<typename T>
class mn::pointer::basic_linked_ptr< T >
This class implements a basic_linked_ptr template that it allows sharing of pointers between instances via reference counting. basic_linked_ptr objects can safely be copied.
- Note
- Is not thread-safe.
Member Typedef Documentation
◆ base_type
template<typename T >
using mn::pointer::basic_linked_ptr< T >::base_type = basic_linked_ptr_node |
◆ element_type
template<typename T >
using mn::pointer::basic_linked_ptr< T >::element_type = T |
◆ pointer
template<typename T >
using mn::pointer::basic_linked_ptr< T >::pointer = T* |
◆ reference
template<typename T >
using mn::pointer::basic_linked_ptr< T >::reference = T& |
◆ self_type
template<typename T >
using mn::pointer::basic_linked_ptr< T >::self_type = basic_linked_ptr<T> |
◆ value_type
template<typename T >
using mn::pointer::basic_linked_ptr< T >::value_type = T |
Constructor & Destructor Documentation
◆ basic_linked_ptr() [1/4]
template<typename T >
|
inline |
Construct a new basic linked ptr object.
◆ basic_linked_ptr() [2/4]
template<typename T >
|
inlineexplicit |
Construct,.
- Note
- It is OK if the input pointer is null.
◆ basic_linked_ptr() [3/4]
template<typename T >
|
inline |
◆ basic_linked_ptr() [4/4]
template<typename T >
template<typename U >
|
inline |
◆ ~basic_linked_ptr()
template<typename T >
|
inline |
Member Function Documentation
◆ count()
template<typename T >
|
inline |
Returns the use count of the shared pointer.
- Note
- The return value is one if the owned pointer is null.
- Returns
- The use count of the shared pointer.
◆ detach()
template<typename T >
|
inline |
◆ force_delete()
template<typename T >
|
inline |
◆ get()
template<typename T >
|
inline |
◆ link()
template<typename T >
template<typename U >
|
inlineprotected |
◆ operator bool()
template<typename T >
|
inline |
◆ operator*()
template<typename T >
|
inline |
◆ operator->()
template<typename T >
|
inline |
◆ operator=() [1/3]
template<typename T >
|
inline |
◆ operator=() [2/3]
template<typename T >
template<typename U >
|
inline |
◆ operator=() [3/3]
template<typename T >
template<typename U >
|
inline |
◆ reset() [1/2]
template<typename T >
|
inline |
◆ reset() [2/2]
template<typename T >
template<typename U >
|
inline |
◆ unique()
template<typename T >
|
inline |
If the use count of the owned pointer.
- Returns
- true The use count of the owned pointer is one
- false when not
Friends And Related Function Documentation
◆ basic_linked_ptr
Member Data Documentation
◆ m_pValue
template<typename T >
|
protected |
The documentation for this class was generated from the following file: