KDBindings API Documentation  1.0.95
Public Member Functions | List of all members
KDBindings::Binding< T, ImmediateBindingEvaluator > Class Template Reference

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

#include <binding.h>

Public Member Functions

 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. More...
 
virtual ~Binding ()=default
 
void markDirty () override
 
Bindingoperator= (Binding &&other)=delete
 
Bindingoperator= (Binding const &other)=delete
 
- Public Member Functions inherited from KDBindings::Binding< T, BindingEvaluator >
 Binding ()=delete
 
 Binding (Binding &&other)=delete
 
 Binding (Binding const &other)=delete
 
 Binding (Private::Node< T > &&rootNode, BindingEvaluator const &evaluator)
 Construct a new Binding with a specific evaluator. More...
 
 ~Binding () override
 
void evaluate ()
 
get () const override
 
Bindingoperator= (Binding &&other)=delete
 
Bindingoperator= (Binding const &other)=delete
 
void setUpdateFunction (std::function< void(T &&)> const &updateFunction) override
 
- Public Member Functions inherited from KDBindings::PropertyUpdater< T >
 PropertyUpdater ()=default
 
 PropertyUpdater (PropertyUpdater &&other)=default
 
 PropertyUpdater (PropertyUpdater const &other)=default
 
virtual ~PropertyUpdater ()=default
 
PropertyUpdateroperator= (PropertyUpdater &&other)=default
 
PropertyUpdateroperator= (PropertyUpdater const &other)=default
 

Additional Inherited Members

- Protected Member Functions inherited from KDBindings::Binding< T, BindingEvaluator >
const bool * dirtyVariable () const override
 
Private::Dirtyable ** parentVariable () override
 
- Protected Attributes inherited from KDBindings::Binding< T, BindingEvaluator >
int m_bindingId
 
BindingEvaluator m_evaluator
 
std::function< void(T &&)> m_propertyUpdateFunction
 
Private::Node< T > m_rootNode
 

Detailed Description

template<typename T>
class KDBindings::Binding< T, ImmediateBindingEvaluator >

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

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 Property Binding being evaluated many times before the result is ever used in a typical GUI application.

Template Parameters
TThe type of the value that the Binding expression evaluates to.

Definition at line 197 of file binding.h.

Constructor & Destructor Documentation

◆ Binding() [1/4]

template<typename T >
KDBindings::Binding< T, ImmediateBindingEvaluator >::Binding ( Private::Node< T > &&  rootNode)
inlineexplicit

Construct a new Binding with an immediate mode evaluator.

Parameters
rootNodeRepresents that expression contained in the Binding.

Definition at line 205 of file binding.h.

◆ Binding() [2/4]

template<typename T >
KDBindings::Binding< T, ImmediateBindingEvaluator >::Binding ( )
delete

A Binding is not default constructible.

◆ ~Binding()

template<typename T >
virtual KDBindings::Binding< T, ImmediateBindingEvaluator >::~Binding ( )
virtualdefault

◆ Binding() [3/4]

template<typename T >
KDBindings::Binding< T, ImmediateBindingEvaluator >::Binding ( Binding< T, ImmediateBindingEvaluator > const &  other)
delete

A Binding cannot be copy constructed.

◆ Binding() [4/4]

template<typename T >
KDBindings::Binding< T, ImmediateBindingEvaluator >::Binding ( Binding< T, ImmediateBindingEvaluator > &&  other)
delete

A Binding can not be move constructed.

Member Function Documentation

◆ markDirty()

template<typename T >
void KDBindings::Binding< T, ImmediateBindingEvaluator >::markDirty ( )
inlineoverride

Definition at line 225 of file binding.h.

References KDBindings::Binding< T, EvaluatorT >::evaluate().

◆ operator=() [1/2]

template<typename T >
Binding& KDBindings::Binding< T, ImmediateBindingEvaluator >::operator= ( Binding< T, ImmediateBindingEvaluator > &&  other)
delete

A Binding can not be move assigned.

◆ operator=() [2/2]

template<typename T >
Binding& KDBindings::Binding< T, ImmediateBindingEvaluator >::operator= ( Binding< T, ImmediateBindingEvaluator > const &  other)
delete

A Binding cannot be copy assigned.


The documentation for this class was generated from the following file:

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDBindings
Reactive programming & data binding in C++
https://github.com/KDAB/KDBindings/
Generated by doxygen 1.9.1