Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class 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 >:

[legend]
List of all members.

## Public Types
typedef T | element_type
## Public Member Functions
| 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)
bool | operator== (const ref_ptr &rp) const
bool | operator!= (const ref_ptr &rp) const
bool | operator< (const ref_ptr &rp) const
bool | operator> (const ref_ptr &rp) const
bool | operator== (const T *ptr) const
bool | operator!= (const T *ptr) const
bool | operator< (const T *ptr) const
bool | operator> (const T *ptr) const
T & | operator * ()
const T & | operator * () const
T * | operator-> ()
const T * | operator-> () const
bool | operator! () 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.
T * | release ()

## Detailed Description

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

Smart pointer for handling referenced counted objects.

## Member Typedef Documentation

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

## 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>
bool osg::ref_ptr< T >::operator! | ( |  | ) | const`[inline]`

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

template<class T>
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>
bool osg::ref_ptr< T >::operator< | ( | const T * | ptr | ) | const`[inline]`

template<class T>
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>
bool osg::ref_ptr< T >::operator== | ( | const T * | ptr | ) | const`[inline]`

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

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

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

template<class T>
T* osg::ref_ptr< T >::release | ( |  | ) | `[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>
bool osg::ref_ptr< T >::valid | ( |  | ) | const`[inline]`

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

- ref_ptr