LLVM API Documentation

Public Member Functions
llvm::OwningPtr< T > Class Template Reference

#include <OwningPtr.h>

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

List of all members.

Public Member Functions

 OwningPtr (T *P=0)
 ~OwningPtr ()
void reset (T *P=0)
Ttake ()
Toperator* () const
Toperator-> () const
Tget () const
LLVM_EXPLICIT operator bool () const
bool operator! () const
bool isValid () const
void swap (OwningPtr &RHS)

Detailed Description

template<class T>
class llvm::OwningPtr< T >

OwningPtr smart pointer - OwningPtr mimics a built-in pointer except that it guarantees deletion of the object pointed to, either on destruction of the OwningPtr or via an explicit reset(). Once created, ownership of the pointee object can be taken away from OwningPtr by using the take method.

Definition at line 28 of file OwningPtr.h.


Constructor & Destructor Documentation

template<class T>
llvm::OwningPtr< T >::OwningPtr ( T P = 0) [inline, explicit]

Definition at line 33 of file OwningPtr.h.

template<class T>
llvm::OwningPtr< T >::~OwningPtr ( ) [inline]

Definition at line 44 of file OwningPtr.h.


Member Function Documentation

template<class T>
T* llvm::OwningPtr< T >::get ( ) const [inline]
template<class T>
bool llvm::OwningPtr< T >::isValid ( ) const [inline]

Definition at line 75 of file OwningPtr.h.

template<class T>
LLVM_EXPLICIT llvm::OwningPtr< T >::operator bool ( ) const [inline]

Definition at line 73 of file OwningPtr.h.

template<class T>
bool llvm::OwningPtr< T >::operator! ( ) const [inline]

Definition at line 74 of file OwningPtr.h.

template<class T>
T& llvm::OwningPtr< T >::operator* ( ) const [inline]

Definition at line 66 of file OwningPtr.h.

template<class T>
T* llvm::OwningPtr< T >::operator-> ( ) const [inline]

Definition at line 71 of file OwningPtr.h.

template<class T>
void llvm::OwningPtr< T >::reset ( T P = 0) [inline]
template<class T>
void llvm::OwningPtr< T >::swap ( OwningPtr< T > &  RHS) [inline]
template<class T>
T* llvm::OwningPtr< T >::take ( ) [inline]

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