VISH  0.2
Public Member Functions | Public Attributes
Wizt::ValueAction Struct Reference

Route a notification event to an object's member function. More...

#include </home/werner/origo/vish/ocean/plankton/ValueAction.hpp>

List of all members.

Public Member Functions

Public Attributes


Detailed Description

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 ) );
        }
   };

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