KDBindings::Binding¶
A combination of a root Node with an evaluator. More...
#include <binding.h>
Inherits from KDBindings::PropertyUpdater< T >, KDBindings::Private::Dirtyable
Public Functions¶
Name | |
---|---|
Binding() =delete | |
Binding(Binding && other) =delete | |
Binding(Binding const & other) =delete | |
Binding(Private::Node< T > && rootNode, EvaluatorT const & evaluator) Construct a new Binding with a specific evaluator. |
|
~Binding() override | |
void | evaluate() |
virtual T | get() const override |
Binding & | operator=(Binding && other) =delete |
Binding & | operator=(Binding const & other) =delete |
virtual void | setUpdateFunction(std::function< void(T &&)> const & updateFunction) override |
Protected Functions¶
Name | |
---|---|
const bool * | dirtyVariable() const override |
Private::Dirtyable ** | parentVariable() override |
Protected Attributes¶
Name | |
---|---|
int | m_bindingId |
EvaluatorT | m_evaluator |
std::function< void(T &&)> | m_propertyUpdateFunction |
Private::Node< T > | m_rootNode |
Additional inherited members¶
Public Functions inherited from KDBindings::PropertyUpdater< T >
Name | |
---|---|
PropertyUpdater() =default | |
PropertyUpdater(PropertyUpdater && other) =default | |
PropertyUpdater(PropertyUpdater const & other) =default | |
virtual | ~PropertyUpdater() =default |
Detailed Description¶
1 2 3 |
|
A combination of a root Node with an evaluator.
Template Parameters:
- T The type of the value that the Binding expression evaluates to.
- EvaluatorT The type of the evaluator that is used to evaluate the Binding.
A root Node is formed whenever multiple properties are combined inside a expression and an evaluator is responsible for re-evaluating such an expression whenever any of the constituent properties change.
Public Functions Documentation¶
function Binding¶
1 |
|
A Binding is not default constructible.
function Binding¶
1 2 3 |
|
A Binding can not be move constructed.
function Binding¶
1 2 3 |
|
A Binding cannot be copy constructed.
function Binding¶
1 2 3 4 |
|
Construct a new Binding with a specific evaluator.
Parameters:
- rootNode Represents that expression contained in the Binding.
- evaluator Used to evaluate the expression contained in the Binding.
function ~Binding¶
1 |
|
Destructs the Binding by deregistering it from its evaluator.
function evaluate¶
1 |
|
Re-evaluates the value of the Binding and notifies all dependants of the change.
function get¶
1 |
|
Reimplements: KDBindings::PropertyUpdater::get
Returns the current value of the Binding.
function operator=¶
1 2 3 |
|
A Binding can not be move assigned.
function operator=¶
1 2 3 |
|
A Binding cannot be copy assigned.
function setUpdateFunction¶
1 2 3 |
|
Reimplements: KDBindings::PropertyUpdater::setUpdateFunction
Set the function that should be used to notify associated properties when the Binding re-evaluates.
Protected Functions Documentation¶
function dirtyVariable¶
1 |
|
function parentVariable¶
1 |
|
Protected Attributes Documentation¶
variable m_bindingId¶
1 |
|
The id of the Binding, used for keeping track of the Binding in its evaluator.
variable m_evaluator¶
1 |
|
The evaluator responsible for evaluating this Binding.
variable m_propertyUpdateFunction¶
1 |
|
The function used to notify associated properties when the Binding re-evaluates
variable m_rootNode¶
1 |
|
The root Node of the Binding represents the expression contained by the Binding.
Updated on 2024-04-14 at 00:00:43 +0000