LLVM  6.0.0svn
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"

Public Types

using element_type = T
 

Public Member Functions

 IntrusiveRefCntPtr ()=default
 
 IntrusiveRefCntPtr (T *obj)
 
 IntrusiveRefCntPtr (const IntrusiveRefCntPtr &S)
 
 IntrusiveRefCntPtr (IntrusiveRefCntPtr &&S)
 
template<class X >
 IntrusiveRefCntPtr (IntrusiveRefCntPtr< X > &&S)
 
template<class X >
 IntrusiveRefCntPtr (const IntrusiveRefCntPtr< X > &S)
 
 ~IntrusiveRefCntPtr ()
 
IntrusiveRefCntPtroperator= (IntrusiveRefCntPtr S)
 
Toperator* () const
 
Toperator-> () const
 
Tget () 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 136 of file IntrusiveRefCntPtr.h.

Member Typedef Documentation

◆ element_type

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

Definition at line 140 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 143 of file IntrusiveRefCntPtr.h.

◆ IntrusiveRefCntPtr() [3/6]

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

Definition at line 144 of file IntrusiveRefCntPtr.h.

◆ IntrusiveRefCntPtr() [4/6]

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

Definition at line 145 of file IntrusiveRefCntPtr.h.

◆ IntrusiveRefCntPtr() [5/6]

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

Definition at line 148 of file IntrusiveRefCntPtr.h.

◆ IntrusiveRefCntPtr() [6/6]

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

Definition at line 153 of file IntrusiveRefCntPtr.h.

◆ ~IntrusiveRefCntPtr()

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

Definition at line 157 of file IntrusiveRefCntPtr.h.

References llvm::release.

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 167 of file IntrusiveRefCntPtr.h.

◆ operator*()

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

Definition at line 164 of file IntrusiveRefCntPtr.h.

◆ operator->()

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

Definition at line 165 of file IntrusiveRefCntPtr.h.

◆ operator=()

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

Definition at line 159 of file IntrusiveRefCntPtr.h.

References std::swap().

◆ reset()

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

Definition at line 175 of file IntrusiveRefCntPtr.h.

References llvm::release.

◆ resetWithoutRelease()

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

◆ swap()

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

Definition at line 169 of file IntrusiveRefCntPtr.h.

Friends And Related Function Documentation

◆ IntrusiveRefCntPtr

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

Definition at line 193 of file IntrusiveRefCntPtr.h.


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