#include <esve/components/dimn/Valuator.hxx>
Public Member Functions | |
| virtual T_Value | value () const =0 |
| Query the current value. | |
| virtual Valuator & | value (const T_Value &)=0 |
| Assign a new value. | |
| virtual Valuator & | step (const T_Value &)=0 |
| Set the increment in which the value changes. | |
| virtual Valuator & | range (const T_Value &min_corner, const T_Value &max_corner)=0 |
| Set the allowable range of values. | |
Keep in mind that modifying the value in code (even implicitly with step() or range()) has a side-effect: it will send a handle_*() message as if the user changed it.
Setting the value within handle() itself is OK; the recursion is detected and consequently ignored.
This side-effect of emitting handle() in response to changing the value may seem surprising at first, but in the end it is the right thing. One should not depend upon the kindness of programmers to manually call update() every time they change something in code.
The facilities of kernel::Caching_Node and kernel::Caching_Server solve the issue of handle() being emitted before an object is fully constructed. As of this writing, all front-ends use Simple_Kernel which caches handle() messages during the startup/construction phase.
|
||||||||||
|
Assign a new value.
|
|
||||||||||
|
Set the increment in which the value changes.
|
|
||||||||||||||||
|
Set the allowable range of values.
|
1.3.4