| 
    rippled
    
   | 
 
A weak intrusive pointer class for the SharedIntrusive pointer class. More...
#include <IntrusivePointer.h>
Public Member Functions | |
| WeakIntrusive ()=default | |
| WeakIntrusive (WeakIntrusive const &rhs) | |
| WeakIntrusive (WeakIntrusive &&rhs) | |
| WeakIntrusive (SharedIntrusive< T > const &rhs) | |
| WeakIntrusive (SharedIntrusive< T > const &&rhs)=delete | |
| WeakIntrusive & | operator= (WeakIntrusive const &)=delete | 
| template<class TT >  requires std::convertible_to<TT*, T*>  | |
| WeakIntrusive & | operator= (SharedIntrusive< TT > const &rhs) | 
| void | adopt (T *ptr) | 
| Adopt the raw pointer and increment the weak count.   | |
| ~WeakIntrusive () | |
| SharedIntrusive< T > | lock () const | 
| Get a strong pointer from the weak pointer, if possible.   | |
| bool | expired () const | 
| Return true if the strong count is zero.   | |
| void | reset () | 
| Set the pointer to null and decrement the weak count.   | |
Private Member Functions | |
| void | unsafeReleaseNoStore () | 
| Decrement the weak count.   | |
Private Attributes | |
| T * | ptr_ = nullptr | 
A weak intrusive pointer class for the SharedIntrusive pointer class.
Note that this weak pointer class asks differently from normal weak pointer classes. When the strong pointer count goes to zero, the "partialDestructor" is called. See the comment on SharedIntrusive for a fuller explanation.
Definition at line 243 of file IntrusivePointer.h.
      
  | 
  default | 
| ripple::WeakIntrusive< T >::WeakIntrusive | ( | WeakIntrusive< T > const & | rhs | ) | 
| ripple::WeakIntrusive< T >::WeakIntrusive | ( | WeakIntrusive< T > && | rhs | ) | 
| ripple::WeakIntrusive< T >::WeakIntrusive | ( | SharedIntrusive< T > const & | rhs | ) | 
      
  | 
  delete | 
| ripple::WeakIntrusive< T >::~WeakIntrusive | ( | ) | 
      
  | 
  delete | 
| WeakIntrusive & ripple::WeakIntrusive< T >::operator= | ( | SharedIntrusive< TT > const & | rhs | ) | 
| void ripple::WeakIntrusive< T >::adopt | ( | T * | ptr | ) | 
Adopt the raw pointer and increment the weak count.
| SharedIntrusive< T > ripple::WeakIntrusive< T >::lock | ( | ) | const | 
Get a strong pointer from the weak pointer, if possible.
This will only return a seated pointer if the strong count on the raw pointer is non-zero before locking.
| bool ripple::WeakIntrusive< T >::expired | ( | ) | const | 
Return true if the strong count is zero.
| void ripple::WeakIntrusive< T >::reset | ( | ) | 
Set the pointer to null and decrement the weak count.
Note: This may run the destructor if the strong count is zero.
      
  | 
  private | 
Decrement the weak count.
This does not set the raw pointer to null.
Note: This may run the destructor if the strong count is zero.
      
  | 
  private | 
Definition at line 296 of file IntrusivePointer.h.