33template<
typename T,
typename EvaluatorT = BindingEvaluator>
37 std::is_base_of<BindingEvaluator, EvaluatorT>::value,
38 "The EvaluatorT type must inherit from BindingEvaluator.");
122template<
typename T,
typename EvaluatorT>
125 return std::make_unique<Binding<T, EvaluatorT>>(
Private::makeNode(property), evaluator);
140template<
typename T,
typename EvaluatorT>
143 return std::make_unique<Binding<T, EvaluatorT>>(std::move(rootNode), evaluator);
165 return std::make_unique<Binding<ResultType, EvaluatorT>>(
Private::makeNode(std::forward<Func>(func), std::forward<Args>(args)...), evaluator);
227 return std::make_unique<Binding<T, ImmediateBindingEvaluator>>(
Private::makeNode(property));
244 return std::make_unique<Binding<T, ImmediateBindingEvaluator>>(std::move(rootNode));
264 return std::make_unique<Binding<ResultType, ImmediateBindingEvaluator>>(
Private::makeNode(std::forward<Func>(func), std::forward<Args>(args)...));
291template<
typename... T>
294 auto binding =
makeBinding(std::forward<T>(args)...);
295 return Property<
decltype(binding->get())>(std::move(binding));
A BindingEvaluator provides a mechanism to control the exact time when a KDBindings::Binding is reeva...
A combination of a root Node with an evaluator.
void setUpdateFunction(std::function< void(T &&)> const &updateFunction) override
std::function< void(T &&)> m_propertyUpdateFunction
Binding(Binding &&other)=delete
Private::Dirtyable ** parentVariable() override
Binding & operator=(Binding &&other)=delete
Binding(Private::Node< T > &&rootNode, EvaluatorT const &evaluator)
Construct a new Binding with a specific evaluator.
Binding(Binding const &other)=delete
Binding & operator=(Binding const &other)=delete
const bool * dirtyVariable() const override
Private::Node< T > m_rootNode
void setParent(Dirtyable *newParent)
const ResultType & evaluate() const
A PropertyUpdater defines the interface used to update a Property, e.g. from a binding expression.
A property represents a value that can be part of or the result of data binding.
typename operator_node_result< Operator, Ts... >::type operator_node_result_t
Node< std::decay_t< T > > makeNode(T &&value)
The main namespace of the KDBindings library.
auto makeBoundProperty(T &&...args)
Helper function to create a Property with a Binding.
std::unique_ptr< Binding< T, EvaluatorT > > makeBinding(EvaluatorT &evaluator, Property< T > &property)
Helper function to create a Binding from a Property.