LLVM  14.0.0git
Public Types | Public Member Functions | Friends | List of all members
llvm::IntrusiveRefCntPtr< T > Class Template Reference

A smart pointer to a reference-counted object that inherits from RefCountedBase or ThreadSafeRefCountedBase. More...

#include "llvm/ADT/IntrusiveRefCntPtr.h"

Inheritance diagram for llvm::IntrusiveRefCntPtr< T >:
Inheritance graph
[legend]

Public Types

using element_type = T
 

Public Member Functions

 IntrusiveRefCntPtr ()=default
 
 IntrusiveRefCntPtr (T *obj)
 
 IntrusiveRefCntPtr (const IntrusiveRefCntPtr &S)
 
 IntrusiveRefCntPtr (IntrusiveRefCntPtr &&S)
 
template<class X , std::enable_if_t< std::is_convertible< X *, T * >::value, bool > = true>
 IntrusiveRefCntPtr (IntrusiveRefCntPtr< X > S)
 
template<class X , std::enable_if_t< std::is_convertible< X *, T * >::value, bool > = true>
 IntrusiveRefCntPtr (std::unique_ptr< X > S)
 
 ~IntrusiveRefCntPtr ()
 
IntrusiveRefCntPtroperator= (IntrusiveRefCntPtr S)
 
T & operator* () const
 
T * operator-> () const
 
T * get () const
 
 operator bool () const
 
void swap (IntrusiveRefCntPtr &other)
 
void reset ()
 
void resetWithoutRelease ()
 

Friends

template<typename X >
class IntrusiveRefCntPtr
 

Detailed Description

template<typename T>
class llvm::IntrusiveRefCntPtr< T >

A smart pointer to a reference-counted object that inherits from RefCountedBase or ThreadSafeRefCountedBase.

This class increments its pointee's reference count when it is created, and decrements its refcount when it's destroyed (or is changed to point to a different object).

Definition at line 163 of file IntrusiveRefCntPtr.h.

Member Typedef Documentation

◆ element_type

template<typename T >
using llvm::IntrusiveRefCntPtr< T >::element_type = T

Definition at line 167 of file IntrusiveRefCntPtr.h.

Constructor & Destructor Documentation

◆ IntrusiveRefCntPtr() [1/6]

template<typename T >
llvm::IntrusiveRefCntPtr< T >::IntrusiveRefCntPtr ( )
explicitdefault

◆ IntrusiveRefCntPtr() [2/6]

template<typename T >
llvm::IntrusiveRefCntPtr< T >::IntrusiveRefCntPtr ( T *  obj)
inline

Definition at line 170 of file IntrusiveRefCntPtr.h.

◆ IntrusiveRefCntPtr() [3/6]

template<typename T >
llvm::IntrusiveRefCntPtr< T >::IntrusiveRefCntPtr ( const IntrusiveRefCntPtr< T > &  S)
inline

Definition at line 171 of file IntrusiveRefCntPtr.h.

◆ IntrusiveRefCntPtr() [4/6]

template<typename T >
llvm::IntrusiveRefCntPtr< T >::IntrusiveRefCntPtr ( IntrusiveRefCntPtr< T > &&  S)
inline

Definition at line 172 of file IntrusiveRefCntPtr.h.

◆ IntrusiveRefCntPtr() [5/6]

template<typename T >
template<class X , std::enable_if_t< std::is_convertible< X *, T * >::value, bool > = true>
llvm::IntrusiveRefCntPtr< T >::IntrusiveRefCntPtr ( IntrusiveRefCntPtr< X S)
inline

Definition at line 176 of file IntrusiveRefCntPtr.h.

◆ IntrusiveRefCntPtr() [6/6]

template<typename T >
template<class X , std::enable_if_t< std::is_convertible< X *, T * >::value, bool > = true>
llvm::IntrusiveRefCntPtr< T >::IntrusiveRefCntPtr ( std::unique_ptr< X S)
inline

Definition at line 182 of file IntrusiveRefCntPtr.h.

◆ ~IntrusiveRefCntPtr()

template<typename T >
llvm::IntrusiveRefCntPtr< T >::~IntrusiveRefCntPtr ( )
inline

Definition at line 186 of file IntrusiveRefCntPtr.h.

Member Function Documentation

◆ get()

template<typename T >
T* llvm::IntrusiveRefCntPtr< T >::get ( ) const
inline

◆ operator bool()

template<typename T >
llvm::IntrusiveRefCntPtr< T >::operator bool ( ) const
inlineexplicit

Definition at line 196 of file IntrusiveRefCntPtr.h.

◆ operator*()

template<typename T >
T& llvm::IntrusiveRefCntPtr< T >::operator* ( ) const
inline

Definition at line 193 of file IntrusiveRefCntPtr.h.

◆ operator->()

template<typename T >
T* llvm::IntrusiveRefCntPtr< T >::operator-> ( ) const
inline

Definition at line 194 of file IntrusiveRefCntPtr.h.

◆ operator=()

template<typename T >
IntrusiveRefCntPtr& llvm::IntrusiveRefCntPtr< T >::operator= ( IntrusiveRefCntPtr< T >  S)
inline

Definition at line 188 of file IntrusiveRefCntPtr.h.

◆ reset()

template<typename T >
void llvm::IntrusiveRefCntPtr< T >::reset ( )
inline

Definition at line 204 of file IntrusiveRefCntPtr.h.

◆ resetWithoutRelease()

template<typename T >
void llvm::IntrusiveRefCntPtr< T >::resetWithoutRelease ( )
inline

Definition at line 209 of file IntrusiveRefCntPtr.h.

◆ swap()

template<typename T >
void llvm::IntrusiveRefCntPtr< T >::swap ( IntrusiveRefCntPtr< T > &  other)
inline

Friends And Related Function Documentation

◆ IntrusiveRefCntPtr

template<typename T >
template<typename X >
friend class IntrusiveRefCntPtr
friend

Definition at line 222 of file IntrusiveRefCntPtr.h.


The documentation for this class was generated from the following file: