Reference count handle.  
 More...
#include <asyncpp/ref.h>
 | 
| 
constexpr  | ref () noexcept | 
|   | Construct an empty ref. 
  | 
|   | 
|   | ref (T *ptr, decltype(adopt_ref)) noexcept | 
|   | Construct a new ref object.  
  | 
|   | 
|   | ref (T *ptr) noexcept(noexcept(refcounted_add_ref(std::declval< T * >()))) | 
|   | Construct a new ref object incrementing the reference count of the passed pointer.  
  | 
|   | 
|   | ref (const ref &other) noexcept(noexcept(refcounted_add_ref(std::declval< T * >()))) | 
|   | Construct a new ref object.  
  | 
|   | 
| 
constexpr  | ref (ref &&other) noexcept | 
|   | Move constructor. 
  | 
|   | 
| 
ref &  | operator= (const ref &other) noexcept(noexcept(refcounted_add_ref(std::declval< T * >())) &&noexcept(refcounted_remove_ref(std::declval< T * >()))) | 
|   | Assignment operator. 
  | 
|   | 
| 
ref &  | operator= (ref &&other) noexcept(noexcept(refcounted_remove_ref(std::declval< T * >()))) | 
|   | Move assignment operator. 
  | 
|   | 
| void  | reset (T *ptr) noexcept(noexcept(refcounted_add_ref(std::declval< T * >())) &&noexcept(refcounted_remove_ref(std::declval< T * >()))) | 
|   | Reset the handle with a new value.  
  | 
|   | 
| void  | reset (T *ptr, decltype(adopt_ref)) noexcept(noexcept(refcounted_remove_ref(std::declval< T * >()))) | 
|   | Reset the handle with a new value.  
  | 
|   | 
| 
void  | reset () noexcept(noexcept(refcounted_remove_ref(std::declval< T * >()))) | 
|   | Reset the handle to nullptr. 
  | 
|   | 
| 
  | ~ref () noexcept(noexcept(refcounted_remove_ref(std::declval< T * >()))) | 
|   | Destructor. 
  | 
|   | 
| 
constexpr T *  | operator-> () const noexcept | 
|   | Dereference this handle. 
  | 
|   | 
| 
constexpr T &  | operator* () const noexcept | 
|   | Dereference this handle. 
  | 
|   | 
| 
constexpr T *  | get () const noexcept | 
|   | Get the contained value. 
  | 
|   | 
| 
constexpr T *  | release () noexcept | 
|   | Release the contained pointer. 
  | 
|   | 
| 
constexpr  | operator bool () const noexcept | 
|   | Check if the handle contains a pointer. 
  | 
|   | 
| 
constexpr bool  | operator! () const noexcept | 
|   | Check if the handle contains no pointer. 
  | 
|   | 
template<typename T>
class asyncpp::ref< T >
Reference count handle. 
- Template Parameters
 - 
  
    | T | Type of the reference counted class  | 
  
   
 
◆ ref() [1/3]
template<typename T > 
  
  
      
        
          | asyncpp::ref< T >::ref  | 
          ( | 
          T * |           ptr,  | 
         
        
           | 
           | 
          decltype(adopt_ref< T >) |            ) | 
         
       
   | 
  
inlinenoexcept   | 
  
 
Construct a new ref object. 
- Parameters
 - 
  
    | ptr | The pointer to store  | 
    | adopt_ref | the reference count is already incremented, keep it as is  | 
  
   
 
 
◆ ref() [2/3]
Construct a new ref object incrementing the reference count of the passed pointer. 
- Parameters
 - 
  
  
 
 
 
◆ ref() [3/3]
Construct a new ref object. 
- Parameters
 - 
  
    | ptr | The pointer to store  | 
    | adopt_ref | the reference count is already incremented, keep it as is | 
  
   
Copy constructor 
 
 
◆ reset() [1/2]
Reset the handle with a new value. 
- Parameters
 - 
  
    | ptr | The new pointer  | 
    | adopt_ref | the reference count is already incremented, keep it as is  | 
  
   
 
 
◆ reset() [2/2]
template<typename T > 
  
  
      
        
          | void asyncpp::ref< T >::reset  | 
          ( | 
          T * |           ptr,  | 
         
        
           | 
           | 
          decltype(adopt_ref< T >) |            ) | 
         
       
   | 
  
inlinenoexcept   | 
  
 
Reset the handle with a new value. 
- Parameters
 - 
  
    | ptr | The new pointer  | 
    | adopt_ref | the reference count is already incremented, keep it as is  | 
  
   
 
 
The documentation for this class was generated from the following file: