libvisual  0.5.0
Public Types | Public Member Functions | List of all members
LV::IntrusivePtr< T > Class Template Reference

Intrusive smart pointer class template. More...

#include <libvisual/lv_intrusive_ptr.hpp>

Inheritance diagram for LV::IntrusivePtr< T >:
Inheritance graph
[legend]

Public Types

typedef T element_type
 

Public Member Functions

 IntrusivePtr (T *ptr, bool add_ref=true)
 
template<typename U >
 IntrusivePtr (IntrusivePtr< U > const &rhs)
 
 IntrusivePtr (IntrusivePtr const &rhs)
 Copy constructor.
 
 IntrusivePtr (IntrusivePtr &&rhs)
 Move constructor.
 
 ~IntrusivePtr ()
 Destructor.
 
template<class U >
IntrusivePtroperator= (IntrusivePtr< U > const &rhs)
 Assignment operator.
 
IntrusivePtroperator= (IntrusivePtr const &rhs)
 Copy assignment operator.
 
IntrusivePtroperator= (T *rhs)
 Raw-pointer assignment operator.
 
IntrusivePtroperator= (IntrusivePtr &&rhs)
 Move assignment.
 
void reset ()
 Resets pointer to null.
 
void reset (T *rhs)
 
T * get () const
 Returns the memory managed pointer.
 
T & operator* () const
 Dereference operator.
 
T * operator-> () const
 Member dereference operator.
 
 operator bool () const
 Bool conversion operator.
 
void swap (IntrusivePtr &rhs)
 Swaps pointer with another.
 

Detailed Description

template<typename T>
class LV::IntrusivePtr< T >

Intrusive smart pointer class template.

Template Parameters
TClass to reference count
Note
This is an implementation of boost::intrusive_ptr.

The type T must have two functions overloaded:

Definition at line 19 of file lv_intrusive_ptr.hpp.


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