Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osg::ref_ptr< T > Class Template Reference

Smart pointer for handling referenced counted objects. More...

Inheritance diagram for osg::ref_ptr< T >:

Inheritance graph
[legend]
List of all members.

Public Methods

 ref_ptr ()
 ref_ptr (T *t)
 ref_ptr (const ref_ptr &rp)
 ~ref_ptr ()
ref_ptr & operator= (const ref_ptr &rp)
ref_ptr & operator= (T *ptr)
const bool operator== (const ref_ptr &rp) const
const bool operator== (const T *ptr) const
const bool operator!= (const ref_ptr &rp) const
const bool operator!= (const T *ptr) const
const bool operator< (const ref_ptr &rp) const
const bool operator> (const ref_ptr &rp) const
const bool operator> (const T *ptr) const
T & operator * ()
const T & operator * () const
T * operator-> ()
const T * operator-> () const
const bool operator! () const
const bool valid () const
T * get ()
const T * get () const
T * take ()
 take control over the object pointed to by ref_ptr, unreference but do not delete even if ref count goes to 0, return the pointer to the object.


Detailed Description

template<class T>
class osg::ref_ptr< T >

Smart pointer for handling referenced counted objects.


Constructor & Destructor Documentation

template<class T>
osg::ref_ptr< T >::ref_ptr   [inline]
 

template<class T>
osg::ref_ptr< T >::ref_ptr T *    t [inline]
 

template<class T>
osg::ref_ptr< T >::ref_ptr const ref_ptr< T > &    rp [inline]
 

template<class T>
osg::ref_ptr< T >::~ref_ptr   [inline]
 


Member Function Documentation

template<class T>
const T* osg::ref_ptr< T >::get   const [inline]
 

template<class T>
T* osg::ref_ptr< T >::get   [inline]
 

template<class T>
const T& osg::ref_ptr< T >::operator *   const [inline]
 

template<class T>
T& osg::ref_ptr< T >::operator *   [inline]
 

template<class T>
const bool osg::ref_ptr< T >::operator!   const [inline]
 

template<class T>
const bool osg::ref_ptr< T >::operator!= const T *    ptr const [inline]
 

template<class T>
const bool osg::ref_ptr< T >::operator!= const ref_ptr< T > &    rp const [inline]
 

template<class T>
const T* osg::ref_ptr< T >::operator->   const [inline]
 

template<class T>
T* osg::ref_ptr< T >::operator->   [inline]
 

template<class T>
const bool osg::ref_ptr< T >::operator< const ref_ptr< T > &    rp const [inline]
 

template<class T>
ref_ptr& osg::ref_ptr< T >::operator= T *    ptr [inline]
 

template<class T>
ref_ptr& osg::ref_ptr< T >::operator= const ref_ptr< T > &    rp [inline]
 

template<class T>
const bool osg::ref_ptr< T >::operator== const T *    ptr const [inline]
 

template<class T>
const bool osg::ref_ptr< T >::operator== const ref_ptr< T > &    rp const [inline]
 

template<class T>
const bool osg::ref_ptr< T >::operator> const T *    ptr const [inline]
 

template<class T>
const bool osg::ref_ptr< T >::operator> const ref_ptr< T > &    rp const [inline]
 

template<class T>
T* osg::ref_ptr< T >::take   [inline]
 

take control over the object pointed to by ref_ptr, unreference but do not delete even if ref count goes to 0, return the pointer to the object.

Note, do not use this unless you are 100% sure your code handles the deletion of the object correctly, and only use when absolutely required.

template<class T>
const bool osg::ref_ptr< T >::valid   const [inline]
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:40 2002 for the Open Scene Graph by doxygen 1.2.16.