Util::Callback< T > Class Template Reference

Base class for callbacks that can be nested. More...

#include <Callback.h>

List of all members.

Public Member Functions

 Callback ()
void setNestedCallback (T *nc)
T * getNestedCallback ()
const T * getNestedCallback () const
void addNestedCallback (T *nc)
void removeNestedCallback (T *nc)

Public Attributes

osg::ref_ptr< T > _nestedCallback

Protected Member Functions

virtual ~Callback ()
 Protected destructor forces the object to be deleted by being dereferenced.


Detailed Description

template<class T>
class Util::Callback< T >

Base class for callbacks that can be nested.

Looks much like osg::NodeCallback.

Warning:
Don't forget to call
 if (_nestedCallback.valid()) _nestedCallback->myMethod(myParams...); 
in every method.
Author:
Sukender

Definition at line 46 of file Callback.h.


Constructor & Destructor Documentation

template<class T>
Util::Callback< T >::Callback (  )  [inline]

Definition at line 48 of file Callback.h.

template<class T>
virtual Util::Callback< T >::~Callback (  )  [inline, protected, virtual]

Protected destructor forces the object to be deleted by being dereferenced.

Also avoids the object from beeing created on the stack.

Definition at line 76 of file Callback.h.


Member Function Documentation

template<class T>
void Util::Callback< T >::addNestedCallback ( T *  nc  )  [inline]

Definition at line 54 of file Callback.h.

template<class T>
const T* Util::Callback< T >::getNestedCallback (  )  const [inline]

Definition at line 52 of file Callback.h.

template<class T>
T* Util::Callback< T >::getNestedCallback (  )  [inline]

Definition at line 51 of file Callback.h.

template<class T>
void Util::Callback< T >::removeNestedCallback ( T *  nc  )  [inline]

Definition at line 61 of file Callback.h.

template<class T>
void Util::Callback< T >::setNestedCallback ( T *  nc  )  [inline]

Definition at line 50 of file Callback.h.


Member Data Documentation

template<class T>
osg::ref_ptr<T> Util::Callback< T >::_nestedCallback


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

Generated on Sun Jan 17 11:39:37 2010 for PVLE (Pro-Vocation Light Engine) by  doxygen 1.5.9