|
pixled-lib
1.0
|
#include <conditional.h>


Public Member Functions | |
| T | operator() (led l, time t) const override |
Public Member Functions inherited from pixled::Function< If< T >, T, bool, T, T > | |
| Function (Fcts &&... fcts) | |
| const base::Function< typename std::tuple_element< i, decltype(args)>::type::Type > & | arg () const |
| std::tuple_element< i, decltype(args)>::type::Type | call (led l, time t) const |
Additional Inherited Members | |
Public Types inherited from pixled::Function< If< T >, T, bool, T, T > | |
| using | Type = typename base::Function< T >::Type |
Public Types inherited from pixled::base::Function< T > | |
| typedef T | Type |
Protected Member Functions inherited from pixled::Function< If< T >, T, bool, T, T > | |
| base::Function< T > * | copy () const override |
Protected Attributes inherited from pixled::Function< If< T >, T, bool, T, T > | |
| std::tuple< const FctWrapper< Args >... > | args |
pixled If statement.
T denotes the return type of functions returned depending on the condition.
An If statement takes 3 parameters:
condition, of type base::Function<bool> (function returning a boolean)then function, of type base::Function<T>, returned when the condition is trueelse function, of type base::Function<T>, returned when the condition is false| T | type of Functions returned in the then / else cases |
| bool | condition |
| T | then function |
| T | else function |
| T | value returned by the then or else function, depending on the condition |
|
inlineoverridevirtual |
Computes the value of this Function for led l at time t.
| l | led |
| t | time |
l at time t. Notice that evaluating a function usually requires the recursive evaluation of other Functions (that are actually parameters of this function) until a Constant is reached for example. Implements pixled::base::Function< T >.