|
template<typename T > |
std::unique_ptr< Binding< T, ImmediateBindingEvaluator > > | makeBinding (const Property< T > &property) |
| Creates an immediate mode binding from a const property. More...
|
|
template<typename T , typename EvaluatorT > |
std::unique_ptr< Binding< T, EvaluatorT > > | makeBinding (EvaluatorT &evaluator, const Property< T > &property) |
| Creates a binding from a const property using a specified evaluator. More...
|
|
template<typename EvaluatorT , typename Func , typename... Args, typename = std::enable_if_t<sizeof...(Args) != 0>, typename ResultType = Private::operator_node_result_t<Func, Args...>> |
std::unique_ptr< Binding< ResultType, EvaluatorT > > | makeBinding (EvaluatorT &evaluator, Func &&func, Args &&...args) |
| Helper function to create a Binding from a function and its arguments. More...
|
|
template<typename T , typename EvaluatorT > |
std::unique_ptr< Binding< T, EvaluatorT > > | makeBinding (EvaluatorT &evaluator, Private::Node< T > &&rootNode) |
| Helper function to create a Binding from a root Node. More...
|
|
template<typename T , typename EvaluatorT > |
std::unique_ptr< Binding< T, EvaluatorT > > | makeBinding (EvaluatorT &evaluator, Property< T > &property) |
| Helper function to create a Binding from a Property. More...
|
|
template<typename Func , typename... Args, typename = std::enable_if_t<sizeof...(Args) != 0>, typename ResultType = Private::operator_node_result_t<Func, Args...>> |
std::unique_ptr< Binding< ResultType, ImmediateBindingEvaluator > > | makeBinding (Func &&func, Args &&...args) |
| Helper function to create an immediate mode Binding from a function and its arguments. More...
|
|
template<typename T > |
std::unique_ptr< Binding< T, ImmediateBindingEvaluator > > | makeBinding (Private::Node< T > &&rootNode) |
| Helper function to create an immediate mode Binding from a root Node. More...
|
|
template<typename T > |
std::unique_ptr< Binding< T, ImmediateBindingEvaluator > > | makeBinding (Property< T > &property) |
| Helper function to create an immediate mode Binding from a Property. More...
|
|
template<typename... T> |
auto | makeBoundProperty (T &&...args) |
| Helper function to create a Property with a Binding. More...
|
|
template<typename T > |
std::ostream & | operator<< (std::ostream &stream, Property< T > const &property) |
|
template<typename T > |
std::istream & | operator>> (std::istream &stream, Property< T > &prop) |
|
The main namespace of the KDBindings library.
All public parts of KDBindings are members of this namespace.
template<typename T , typename EvaluatorT >
std::unique_ptr<Binding<T, EvaluatorT> > KDBindings::makeBinding |
( |
EvaluatorT & |
evaluator, |
|
|
const Property< T > & |
property |
|
) |
| |
|
inline |
Creates a binding from a const property using a specified 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. |
- Parameters
-
evaluator | The evaluator that is used to evaluate the Binding. |
property | The const Property to create a Binding from. |
- Returns
- std::unique_ptr<Binding<T, EvaluatorT>> A new Binding that is powered by the evaluator.
Note: Using a const Property ensures that the source cannot be modified through this binding, maintaining data integrity and supporting scenarios where data should only be observed, not altered.
Definition at line 141 of file binding.h.
template<typename EvaluatorT , typename Func , typename... Args, typename = std::enable_if_t<sizeof...(Args) != 0>, typename ResultType = Private::operator_node_result_t<Func, Args...>>
std::unique_ptr<Binding<ResultType, EvaluatorT> > KDBindings::makeBinding |
( |
EvaluatorT & |
evaluator, |
|
|
Func && |
func, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Helper function to create a Binding from a function and its arguments.
- Template Parameters
-
EvaluatorT | The type of the evaluator that is used to evaluate the Binding. |
- Parameters
-
evaluator | The evaluator that is used to evaluate the Binding. |
- Template Parameters
-
Func | The type of the function - may be any type that implements operator(). |
- Parameters
-
- Template Parameters
-
Args | The function argument types |
- Parameters
-
args | The function arguments - Possible values include: Properties, Constants and Nodes They will be automatically unwrapped, i.e. a Property<T> will pass a value of type T to func. |
- Returns
- std::unique_ptr<Binding<ReturnType, EvaluatorT>> where ReturnType is the type that results from evaluationg func with the given arguments. The Binding will be powered by the new evaluator.
Note: For the difference between makeBinding and makeBoundProperty, see the "Reassigning a Binding" section in the Getting Started guide.
Definition at line 181 of file binding.h.
template<typename T , typename EvaluatorT >
std::unique_ptr<Binding<T, EvaluatorT> > KDBindings::makeBinding |
( |
EvaluatorT & |
evaluator, |
|
|
Private::Node< T > && |
rootNode |
|
) |
| |
|
inline |
Helper function to create a Binding from a root Node.
- 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. |
- Parameters
-
evaluator | The evaluator that is used to evaluate the Binding. |
rootNode | Represents the expression that will be evaluated by the Binding. |
- Returns
- std::unique_ptr<Binding<T, EvaluatorT>> A new Binding that combines the rootNode with the evaluator.
Note: For the difference between makeBinding and makeBoundProperty, see the "Reassigning a Binding" section in the Getting Started guide.
Definition at line 159 of file binding.h.
template<typename T , typename EvaluatorT >
std::unique_ptr<Binding<T, EvaluatorT> > KDBindings::makeBinding |
( |
EvaluatorT & |
evaluator, |
|
|
Property< T > & |
property |
|
) |
| |
|
inline |
Helper function to create a Binding from a Property.
- 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. |
- Parameters
-
- Returns
- std::unique_ptr<Binding<T, EvaluatorT>> A new Binding that is powered by the evaluator.
Note: For the difference between makeBinding and makeBoundProperty, see the "Reassigning a Binding" section in the Getting Started guide.
Definition at line 123 of file binding.h.
Referenced by makeBoundProperty().
template<typename Func , typename... Args, typename = std::enable_if_t<sizeof...(Args) != 0>, typename ResultType = Private::operator_node_result_t<Func, Args...>>
Helper function to create an immediate mode Binding from a function and its arguments.
- Template Parameters
-
Func | The type of the function - may be any type that implements operator(). |
- Parameters
-
- Template Parameters
-
Args | The function argument types |
- Parameters
-
args | The function arguments - Possible values include: Properties, Constants and Nodes They will be automatically unwrapped, i.e. a Property<T> will pass a value of type T to func. |
- Returns
- std::unique_ptr<Binding<ReturnType, ImmediateBindingEvaluator>> where ReturnType is the type that results from evaluationg func with the given arguments. The Binding will feature immediate evaluation.
Note: For the difference between makeBinding and makeBoundProperty, see the "Reassigning a Binding" section in the Getting Started guide.
Definition at line 298 of file binding.h.
template<typename... T>
auto KDBindings::makeBoundProperty |
( |
T &&... |
args | ) |
|
|
inline |