VISH
0.2
|
Route a notification event to an object's member function. More...
#include </home/werner/origo/vish/ocean/plankton/ValueAction.hpp>
Route a notification event to an object's member function.
This is actually one of the coolest classes in VISH. It allows to register an arbitrary object's member function (well, the object must be reference-countable) to be invoked when a certain parameter value is changed. The application code will look like this:
class MyObject : public VObject { bool myAction(const RefPtr<VValueBase>&value) { return false; } public: MyObject(...) : VObject(...) { addParam(20, "sensitivity"); AddParameterAction( "sensitivity", new ValueAction<MyObject>( self(), &MyObject::myAction ) ); } };