#include <udata.hpp>
Inheritance diagram for ubit::UData:
Public Member Functions | |
UData (UMask b_modes=0) | |
virtual class UData * | dataCast () |
dynamic cast | |
virtual const UClass & | getClass () const =0 |
virtual UData & | onChange (UCall &) |
adds a callback that is fired when the value is modified. | |
virtual void | changed (bool update=true) |
[impl] called when object's content is changed. | |
virtual void | update ()=0 |
updates graphics. |
Data objects can have callback functions that are fired when their value is changed. Data parents can also be notified when data value are modified by using the UOn::dataChange condition (see below).
see an example in class UStr. The only difference is that UOn::dataChange must be used instead of UOn::strChange for specifing callbacks in parents.
void ubit::UData::changed | ( | bool | update = true |
) | [virtual] |
[impl] called when object's content is changed.
This function updates graphics (if 'update' is true) then fires parents' UOn::dataChange callbacks
Reimplemented in ubit::UStr.
adds a callback that is fired when the value is modified.
Reimplemented in ubit::UStr.