LLVM API Documentation
#include <IntrusiveRefCntPtr.h>
Public Types | |
typedef T | element_type |
Public Member Functions | |
IntrusiveRefCntPtr () | |
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 & | operator= (IntrusiveRefCntPtr S) |
~IntrusiveRefCntPtr () | |
T & | operator* () const |
T * | operator-> () const |
T * | get () const |
LLVM_EXPLICIT | operator bool () const |
void | swap (IntrusiveRefCntPtr &other) |
void | reset () |
void | resetWithoutRelease () |
IntrusiveRefCntPtr - A template class that implements a "smart pointer" that assumes the wrapped object has a reference count associated with it that can be managed via calls to IntrusivePtrAddRef/IntrusivePtrRelease. The smart pointers manage reference counts via the RAII idiom: upon creation of smart pointer the reference count of the wrapped object is incremented and upon destruction of the smart pointer the reference count is decremented. This class also safely handles wrapping NULL pointers.
Reference counting is implemented via calls to Obj->Retain()/Obj->Release(). Release() is required to destroy the object when the reference count reaches zero. Inheriting from RefCountedBase/RefCountedBaseVPTR takes care of this automatically.
Definition at line 136 of file IntrusiveRefCntPtr.h.
typedef T llvm::IntrusiveRefCntPtr< T >::element_type |
Definition at line 140 of file IntrusiveRefCntPtr.h.
llvm::IntrusiveRefCntPtr< T >::IntrusiveRefCntPtr | ( | ) | [inline, explicit] |
Definition at line 142 of file IntrusiveRefCntPtr.h.
llvm::IntrusiveRefCntPtr< T >::IntrusiveRefCntPtr | ( | T * | obj | ) | [inline] |
Definition at line 144 of file IntrusiveRefCntPtr.h.
llvm::IntrusiveRefCntPtr< T >::IntrusiveRefCntPtr | ( | const IntrusiveRefCntPtr< T > & | S | ) | [inline] |
Definition at line 148 of file IntrusiveRefCntPtr.h.
llvm::IntrusiveRefCntPtr< T >::IntrusiveRefCntPtr | ( | IntrusiveRefCntPtr< T > && | S | ) | [inline] |
Definition at line 152 of file IntrusiveRefCntPtr.h.
llvm::IntrusiveRefCntPtr< T >::IntrusiveRefCntPtr | ( | IntrusiveRefCntPtr< X > && | S | ) | [inline] |
Definition at line 157 of file IntrusiveRefCntPtr.h.
llvm::IntrusiveRefCntPtr< T >::IntrusiveRefCntPtr | ( | const IntrusiveRefCntPtr< X > & | S | ) | [inline] |
Definition at line 162 of file IntrusiveRefCntPtr.h.
llvm::IntrusiveRefCntPtr< T >::~IntrusiveRefCntPtr | ( | ) | [inline] |
Definition at line 172 of file IntrusiveRefCntPtr.h.
T* llvm::IntrusiveRefCntPtr< T >::get | ( | ) | const [inline] |
Definition at line 178 of file IntrusiveRefCntPtr.h.
Referenced by llvm::simplify_type< IntrusiveRefCntPtr< T > >::getSimplifiedValue(), llvm::simplify_type< const IntrusiveRefCntPtr< T > >::getSimplifiedValue(), llvm::operator!=(), and llvm::operator==().
LLVM_EXPLICIT llvm::IntrusiveRefCntPtr< T >::operator bool | ( | ) | const [inline] |
Definition at line 180 of file IntrusiveRefCntPtr.h.
T& llvm::IntrusiveRefCntPtr< T >::operator* | ( | ) | const [inline] |
Definition at line 174 of file IntrusiveRefCntPtr.h.
T* llvm::IntrusiveRefCntPtr< T >::operator-> | ( | ) | const [inline] |
Definition at line 176 of file IntrusiveRefCntPtr.h.
IntrusiveRefCntPtr& llvm::IntrusiveRefCntPtr< T >::operator= | ( | IntrusiveRefCntPtr< T > | S | ) | [inline] |
Definition at line 167 of file IntrusiveRefCntPtr.h.
void llvm::IntrusiveRefCntPtr< T >::reset | ( | ) | [inline] |
Definition at line 188 of file IntrusiveRefCntPtr.h.
Referenced by llvm::sys::fs::recursive_directory_iterator::increment().
void llvm::IntrusiveRefCntPtr< T >::resetWithoutRelease | ( | ) | [inline] |
Definition at line 193 of file IntrusiveRefCntPtr.h.
void llvm::IntrusiveRefCntPtr< T >::swap | ( | IntrusiveRefCntPtr< T > & | other | ) | [inline] |
Definition at line 182 of file IntrusiveRefCntPtr.h.
Referenced by llvm::IntrusiveRefCntPtr< detail::DirIterState >::operator=().