pixled-lib  1.0
Public Member Functions | List of all members
pixled::detail::Cast< To, From > Class Template Reference

#include <function.h>

Inheritance diagram for pixled::detail::Cast< To, From >:
Inheritance graph
[legend]
Collaboration diagram for pixled::detail::Cast< To, From >:
Collaboration graph
[legend]

Public Member Functions

 Cast (const base::Function< From > &from)
 
 Cast (base::Function< From > &&from)
 
To operator() (led l, time t) const override
 
Cast< To, From > * copy () const override
 

Additional Inherited Members

- Public Types inherited from pixled::base::Function< To >
typedef To Type
 

Detailed Description

template<typename To, typename From>
class pixled::detail::Cast< To, From >

Cast implementation.

This class is not supposed to be used directy: use pixled::Cast method instead to benefit from automatic template deduction.

Template Parameters
Toreturn type of the converted function (fundamental type)
Fromreturn type of the input function (fundamental type)

Constructor & Destructor Documentation

◆ Cast() [1/2]

template<typename To , typename From >
pixled::detail::Cast< To, From >::Cast ( const base::Function< From > &  from)
inline

lvalue Cast constructor

◆ Cast() [2/2]

template<typename To , typename From >
pixled::detail::Cast< To, From >::Cast ( base::Function< From > &&  from)
inline

rvalue Cast constructor

Member Function Documentation

◆ operator()()

template<typename To , typename From >
To pixled::detail::Cast< To, From >::operator() ( led  l,
time  t 
) const
inlineoverridevirtual

Computes the value of this Function for led l at time t.

Parameters
lled
ttime
Returns
Result of this Function, evaluated on led 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< To >.

◆ copy()

template<typename To , typename From >
Cast<To, From>* pixled::detail::Cast< To, From >::copy ( ) const
inlineoverridevirtual

Returns a dynamically allocated copy of this function.

Returns
copy of this function

Implements pixled::base::Function< To >.


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