Skip to content

KDBindings::Binding< T, ImmediateBindingEvaluator >

Provides a convenience for old-school, immediate mode Bindings. More...

#include <binding.h>

Inherits from KDBindings::Binding< T, BindingEvaluator >, 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)
Construct a new Binding with an immediate mode evaluator.
virtual ~Binding() =default
void markDirty() override
Binding & operator=(Binding && other) =delete
Binding & operator=(Binding const & other) =delete

Additional inherited members

Public Functions inherited from KDBindings::Binding< T, BindingEvaluator >

Name
void evaluate()
virtual T get() const override
virtual void setUpdateFunction(std::function< void(T &&)> const & updateFunction) override

Protected Functions inherited from KDBindings::Binding< T, BindingEvaluator >

Name
const bool * dirtyVariable() const override
Private::Dirtyable ** parentVariable() override

Protected Attributes inherited from KDBindings::Binding< T, BindingEvaluator >

Name
int m_bindingId
EvaluatorT m_evaluator
std::function< void(T &&)> m_propertyUpdateFunction
Private::Node< T > m_rootNode

Public Functions inherited from KDBindings::PropertyUpdater< T >

Name
PropertyUpdater() =default
PropertyUpdater(PropertyUpdater && other) =default
PropertyUpdater(PropertyUpdater const & other) =default
virtual ~PropertyUpdater() =default
virtual T get() const =0
virtual void setUpdateFunction(std::function< void(T &&)> const & updateFunction) =0

Detailed Description

1
2
template <typename T >
class KDBindings::Binding< T, ImmediateBindingEvaluator >;

Provides a convenience for old-school, immediate mode Bindings.

Template Parameters:

  • T The type of the value that the Binding expression evaluates to.

This works in conjunction with a do-nothing ImmediateBindingEvaluator class to update the result of the Binding immediately upon any of the dependent bindables (i.e. Property instances) notifying that they have changed. This can lead to a PropertyBinding being evaluated many times before the result is ever used in a typical GUI application.

Public Functions Documentation

function Binding

1
Binding() =delete

A Binding is not default constructible.

function Binding

1
2
3
Binding(
    Binding && other
) =delete

A Binding can not be move constructed.

function Binding

1
2
3
Binding(
    Binding const & other
) =delete

A Binding cannot be copy constructed.

function Binding

1
2
3
inline explicit Binding(
    Private::Node< T > && rootNode
)

Construct a new Binding with an immediate mode evaluator.

Parameters:

  • rootNode Represents that expression contained in the Binding.

function ~Binding

1
virtual ~Binding() =default

function markDirty

1
inline void markDirty() override

function operator=

1
2
3
Binding & operator=(
    Binding && other
) =delete

A Binding can not be move assigned.

function operator=

1
2
3
Binding & operator=(
    Binding const & other
) =delete

A Binding cannot be copy assigned.


Updated on 2022-04-12 at 00:03:53 +0000

Back to top