pixled-lib  1.0
Public Member Functions | List of all members
pixled::Constant< T > Class Template Reference

#include <function.h>

Inheritance diagram for pixled::Constant< T >:
Inheritance graph
[legend]
Collaboration diagram for pixled::Constant< T >:
Collaboration graph
[legend]

Public Member Functions

 Constant (const T &value)
 
T operator() (led, time) const override
 
Constant< T > * copy () const override
 

Additional Inherited Members

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

Detailed Description

template<typename T>
class pixled::Constant< T >

A base::Function that returns a constant value on any point at any time.

Template Parameters
Ttype of the Constant

Constructor & Destructor Documentation

◆ Constant()

template<typename T >
pixled::Constant< T >::Constant ( const T value)
inline

Constant constructor.

Initializes the constant with the specified value.

Member Function Documentation

◆ operator()()

template<typename T >
T pixled::Constant< T >::operator() ( led  ,
time   
) const
inlineoverridevirtual

Returns the value specified in the constructor, on any point at any time.

Returns
constant value

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

◆ copy()

template<typename T >
Constant<T>* pixled::Constant< T >::copy ( ) const
inlineoverridevirtual

Returns a dynamically copy of this Constant, with the same value.

Returns
copy of this Constant

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


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