#include <weakptr.h>
Inheritance diagram for CL_WeakPtr< Type >:

Public Member Functions | |
| CL_WeakPtr () | |
| CL_WeakPtr (const CL_WeakPtr< Type > ©) | |
| CL_WeakPtr (const CL_SharedPtr< Type > ©) | |
| CL_WeakPtr (const CL_UnknownSharedPtr ©) | |
| ~CL_WeakPtr () | |
| CL_WeakPtr & | operator= (const CL_UnknownSharedPtr ©) |
| CL_WeakPtr & | operator= (const CL_SharedPtr< Type > ©) |
| CL_WeakPtr & | operator= (const CL_WeakPtr ©) |
| bool | disconnect () |
| Disconnect from linked list and unset the pointer. | |
| bool | is_null () const |
| Tests if the pointer is unset, or the weak link is no longer valid. | |
| Type * | get () |
| Retrieves the pointer. | |
| const Type * | get () const |
| Retrieves the pointer. | |
| CL_UnknownSharedPtr | to_unknownptr () const |
| CL_SharedPtr< Type > | to_sharedptr () const |
| operator Type * () | |
| operator const Type * () const | |
| operator CL_UnknownSharedPtr () | |
| operator CL_UnknownSharedPtr () const | |
| operator CL_SharedPtr () | |
| operator CL_SharedPtr () const | |
| Type * | operator-> () |
| const Type * | operator-> () const |
| template<typename OtherType> | |
| bool | operator== (OtherType *other) const |
| template<typename OtherType> | |
| bool | operator!= (OtherType *other) const |
| template<typename OtherType> | |
| bool | operator< (OtherType *other) const |
| template<typename OtherType> | |
| bool | operator<= (OtherType *other) const |
| template<typename OtherType> | |
| bool | operator> (OtherType *other) const |
| template<typename OtherType> | |
| bool | operator>= (OtherType *other) const |
| template<typename Type> | |
| void | create_deleter (Type *instance) |
| template<typename Type> | |
| void | create_deleter (Type *ptr, CL_MemoryPool *pool) |
| template<typename Type> | |
| void | create_deleter (Type *ptr, void(*free_callback)(Type *ptr)) |
| template<typename Type, typename FreeClass> | |
| void | create_deleter (Type *ptr, FreeClass *free_class, void(FreeClass::*free_callback)(Type *ptr)) |
| void | call_deleter () |
| void | connect (const CL_SharedPtr_Link ©) |
| void | set_weak_link () |
| bool | is_invalid_weak_link () const |
Public Attributes | |
| Type * | ptr |
| CL_Mutex * | mutex |
Use CL_WeakPtr when you want to have a pointer that is reference counted by CL_SharedPtr but want a pointer that dont increase the reference count.
The purpose of CL_WeakPtr is to avoid circular loop issues. By using CL_WeakPtr you can construct new CL_SharedPtr'ed objects based on the weak pointer.
|
|||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||
|
|
|
|||||||||
|
Disconnect from linked list and unset the pointer.
Reimplemented from CL_SharedPtr_Link. |
|
|||||||||
|
Retrieves the pointer.
|
|
|||||||||
|
Retrieves the pointer.
|
|
|
|
|
|||||||||
|
Tests if the pointer is unset, or the weak link is no longer valid.
|
|
|||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
||||||||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||||||
|
|
|
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
|
|
|
|||||
|
|
1.4.6