Live Cells C++
Reactive Programming for C++
|
Handle for a cell watch function. More...
#include <watcher.hpp>
Public Member Functions | |
template<typename F > | |
watcher (F callback) | |
Register the cell watch function callback. | |
watcher (const watcher &)=delete | |
~watcher () | |
Remove the registered cell watch function. | |
watcher & | operator= (const watcher &)=delete |
void | stop () |
Remove the watch function. | |
Handle for a cell watch function.
This class registers a cell watch function on construction and automatically removes it on destruction. The watch function can also be removed prior to destruction with the stop()
method.
|
inline |
Register the cell watch function callback.
callback is called whenever the values of the Cell's
referenced with it, using the function call operator, change. It is called once immediately, before the constructor returns, to determine which cells are referenced.
callback | A function of no arguments. |
|
inline |
Remove the watch function.
The watch function will no longer be called after calling this method.