|
Live Cells C++
Reactive Programming for C++
|
A cell which holds a constant value. More...
#include <constant_cell.hpp>
Public Types | |
| typedef T | value_type |
| The type of the constant value. | |
Public Member Functions | |
| constant_cell (const T &value) | |
| Construct a cell with a constant value. | |
| key_ref | key () const |
| Get the key that identifies this cell. | |
| T | value () const |
| Get the constant value held by this cell. | |
| void | add_observer (observer::ref) const |
| void | remove_observer (observer::ref) const |
| T | operator() () const |
| Get the constant value held by this cell. | |
A cell which holds a constant value.
Adding observers to this cell has no effect since its value never changes.
|
inline |
Construct a cell with a constant value.
constant_cell holding the same value is identified by the same key.| value | The constant value. |
|
inline |
Get the key that identifies this cell.
All constant_cell's with the same value have the same key.
|
inline |
Get the constant value held by this cell.
|
inline |
Get the constant value held by this cell.