|
OpenWalnut
1.2.5
|
This callback allows you a simple usage of callbacks in your module. More...
#include <WGEFunctorCallback.h>
Inheritance diagram for WGEFunctorCallback< Type >:Public Types | |
| typedef osg::ref_ptr < WGEFunctorCallback > | SPtr |
| Shared pointer. | |
| typedef osg::ref_ptr< const WGEFunctorCallback > | ConstSPtr |
| Const shared pointer. | |
| typedef boost::function< void(Type *)> | FunctorType |
| The type of functor supported in this callback. | |
Public Member Functions | |
| WGEFunctorCallback (FunctorType functor) | |
| Default constructor. | |
| virtual | ~WGEFunctorCallback () |
| Destructor. | |
| virtual void | operator() (Type *handled, osg::NodeVisitor *nv) |
| This operator gets called by OSG every update cycle. | |
| virtual void | update (osg::NodeVisitor *nv, Type *handled) |
| This gets called by OSG every update cycle. | |
Private Attributes | |
| FunctorType | m_functor |
| The functor getting called each callback. | |
This callback allows you a simple usage of callbacks in your module.
The callback uses function pointers and calls them every update cycle. This is especially useful if you want to use a callback in a module without the need of writing subclasses providing a shared_ptr to the parent module.
| Type | the callback type. You can specify every class that has a nested class called "Callback". |
Definition at line 44 of file WGEFunctorCallback.h.
| typedef osg::ref_ptr< const WGEFunctorCallback > WGEFunctorCallback< Type >::ConstSPtr |
Const shared pointer.
Definition at line 56 of file WGEFunctorCallback.h.
| typedef boost::function< void ( Type* )> WGEFunctorCallback< Type >::FunctorType |
The type of functor supported in this callback.
Definition at line 61 of file WGEFunctorCallback.h.
| typedef osg::ref_ptr< WGEFunctorCallback > WGEFunctorCallback< Type >::SPtr |
Shared pointer.
Definition at line 51 of file WGEFunctorCallback.h.
|
explicit |
Default constructor.
Creates the callback and sets the specified functor instance.
| functor | the function pointer. |
Definition at line 102 of file WGEFunctorCallback.h.
|
virtual |
Destructor.
Definition at line 110 of file WGEFunctorCallback.h.
|
virtual |
This operator gets called by OSG every update cycle.
It calls the specified functor.
| handled | the osg node, stateset or whatever |
| nv | the node visitor |
Definition at line 116 of file WGEFunctorCallback.h.
References WGECallbackTraits< Type >::traverse().
|
virtual |
This gets called by OSG every update cycle.
It calls the specified functor.
| handled | the osg node, stateset or whatever |
| nv | the node visitor |
Definition at line 124 of file WGEFunctorCallback.h.
|
private |
The functor getting called each callback.
Definition at line 98 of file WGEFunctorCallback.h.
1.8.1