![]() |
Klang C++ 0.7.15
Language Reference (draft)
|
Applies a function to a signal (input-output) More...
#include <klang.h>
Inheritance diagram for klang::Generic::Function< SIGNAL, Args >:Public Member Functions | |
| virtual | ~Function () |
| operator SIGNAL () | |
| operator param () | |
| operator float () | |
| unsigned int | args () const |
| template<typename First , typename... Rest> | |
| std::tuple< Rest... > | tail (const std::tuple< First, Rest... > &t) const |
| template<typename FunctionPtr > | |
| Function () | |
| template<typename FunctionPtr > | |
| Function (FunctionPtr function) | |
| template<typename FunctionPtr , typename... OtherArgs> | |
| Function (FunctionPtr function, OtherArgs... args) | |
| void | input () override |
| template<typename First , typename... Rest> | |
| First & | first (First &first, Rest...) |
| template<typename First , typename... Rest> | |
| const First & | first (const First &first, Rest...) const |
| template<typename... FuncArgs> | |
| Function< SIGNAL, Args... > & | operator() (const FuncArgs &... args) |
| template<typename... FuncArgs> | |
| const float | operator() (const FuncArgs &... args) const |
| template<typename... FuncArgs> | |
| Function< SIGNAL, Args... > & | with (FuncArgs... args) |
| signal | evaluate () const |
| virtual void | process () override |
| klang::Graph & | operator>> (klang::Graph &graph) |
| klang::GraphPtr & | operator>> (klang::GraphPtr &graph) |
| operator const SIGNAL & () override | |
| operator const SIGNAL & () const override | |
| template<typename... params> | |
| Modifier< SIGNAL > & | operator() (params &&... p) |
| virtual const SIGNAL & | input () const |
| virtual void | input (const SIGNAL &source) |
| virtual void | operator<< (const SIGNAL &source) |
| virtual const SIGNAL & | output () const |
| template<typename TYPE , class = decltype( std::declval<TYPE&>() = std::declval<SIGNAL&>())> | |
| TYPE & | operator>> (TYPE &destination) |
| template<typename TYPE > | |
| SIGNAL | operator+ (TYPE &other) |
| template<typename TYPE > | |
| SIGNAL | operator* (TYPE &other) |
| template<typename TYPE > | |
| SIGNAL | operator- (TYPE &other) |
| template<typename TYPE > | |
| SIGNAL | operator/ (TYPE &other) |
| void | reset () |
Public Attributes | |
| std::function< float(Args...)> | function |
| std::tuple< Args... > | inputs |
| SIGNAL | in = { 0.f } |
| SIGNAL | out = { 0.f } |
Static Public Attributes | |
| static constexpr unsigned int | ARGS = sizeof...(Args) |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
Definition at line 3195 of file klang.h.
References klang::Generic::Function< SIGNAL, Args >::args(), and klang::Generic::Function< SIGNAL, Args >::with().
|
inline |
Definition at line 3176 of file klang.h.
References klang::Generic::Function< SIGNAL, Args >::ARGS.
Referenced by klang::Generic::Function< SIGNAL, Args >::Function(), klang::Generic::Function< SIGNAL, Args >::operator()(), klang::Generic::Function< SIGNAL, Args >::operator()(), and klang::Generic::Function< SIGNAL, Args >::with().
|
inline |
Definition at line 3289 of file klang.h.
References klang::Generic::Function< SIGNAL, Args >::ARGS, klang::Generic::Function< SIGNAL, Args >::function, klang::Generic::Input< SIGNAL >::in, and klang::Generic::Function< SIGNAL, Args >::inputs.
Referenced by klang::Generic::Function< SIGNAL, Args >::operator float(), klang::Generic::Function< SIGNAL, Args >::operator param(), klang::Generic::Function< SIGNAL, Args >::operator SIGNAL(), and klang::Generic::Function< SIGNAL, Args >::process().
|
inline |
Definition at line 3210 of file klang.h.
References klang::Generic::Function< SIGNAL, Args >::first().
Referenced by klang::Generic::Function< SIGNAL, Args >::first().
|
inline |
Definition at line 3206 of file klang.h.
References klang::Generic::Function< SIGNAL, Args >::first().
Referenced by klang::Generic::Function< SIGNAL, Args >::first(), klang::Generic::Function< SIGNAL, Args >::operator()(), and klang::Generic::Function< SIGNAL, Args >::operator()().
|
inlineoverridevirtual |
Reimplemented from klang::Generic::Input< SIGNAL >.
Definition at line 3200 of file klang.h.
References klang::Generic::Input< SIGNAL >::in, and klang::Generic::Function< SIGNAL, Args >::inputs.
|
inlinevirtualinherited |
Reimplemented in klang::Generic::Graph< SIZE >::Series.
Definition at line 2947 of file klang.h.
References klang::Generic::Input< SIGNAL >::in.
Referenced by klang::Generic::Input< SIGNAL >::operator<<().
|
inlinevirtualinherited |
Reimplemented in klang::Debug.
Definition at line 2951 of file klang.h.
References klang::Generic::Input< SIGNAL >::in, and klang::Generic::Input< SIGNAL >::input().
Referenced by klang::Generic::Input< SIGNAL >::input().
|
inlineoverridevirtualinherited |
Reimplemented from klang::Generic::Output< SIGNAL >.
Definition at line 3091 of file klang.h.
References klang::Generic::Output< SIGNAL >::out.
|
inlineoverridevirtualinherited |
Reimplemented from klang::Generic::Output< SIGNAL >.
Definition at line 3090 of file klang.h.
References klang::Generic::Output< SIGNAL >::out, and klang::Generic::Modifier< SIGNAL >::process().
|
inline |
Definition at line 3142 of file klang.h.
References klang::Generic::Function< SIGNAL, Args >::evaluate(), klang::Generic::Function< SIGNAL, Args >::function, and klang::Generic::Output< SIGNAL >::out.
|
inline |
Definition at line 3137 of file klang.h.
References klang::Generic::Function< SIGNAL, Args >::evaluate(), klang::Generic::Function< SIGNAL, Args >::function, and klang::Generic::Output< SIGNAL >::out.
|
inline |
Definition at line 3131 of file klang.h.
References klang::Generic::Function< SIGNAL, Args >::evaluate(), klang::Generic::Function< SIGNAL, Args >::function, klang::Generic::Output< SIGNAL >::out, and klang::Generic::Function< SIGNAL, Args >::process().
|
inline |
Definition at line 3214 of file klang.h.
References klang::Generic::Function< SIGNAL, Args >::ARGS, klang::Generic::Function< SIGNAL, Args >::args(), klang::Generic::Function< SIGNAL, Args >::first(), klang::Generic::Input< SIGNAL >::in, and klang::Generic::Function< SIGNAL, Args >::inputs.
|
inline |
Definition at line 3247 of file klang.h.
References klang::Generic::Function< SIGNAL, Args >::ARGS, klang::Generic::Function< SIGNAL, Args >::args(), klang::Generic::Function< SIGNAL, Args >::first(), klang::Generic::Function< SIGNAL, Args >::function, klang::Generic::Input< SIGNAL >::in, klang::Generic::Function< SIGNAL, Args >::inputs, and klang::Generic::Output< SIGNAL >::out.
|
inlineinherited |
|
inlineinherited |
Definition at line 2977 of file klang.h.
References klang::Generic::Output< SIGNAL >::process().
|
inlineinherited |
Definition at line 2976 of file klang.h.
References klang::Generic::Output< SIGNAL >::process().
|
inlineinherited |
Definition at line 2978 of file klang.h.
References klang::Generic::Output< SIGNAL >::process().
|
inlineinherited |
Definition at line 2979 of file klang.h.
References klang::Generic::Output< SIGNAL >::process().
|
inlinevirtualinherited |
Reimplemented in klang::Debug.
Definition at line 2950 of file klang.h.
References klang::Generic::Input< SIGNAL >::in, and klang::Generic::Input< SIGNAL >::input().
|
inline |
Definition at line 3849 of file klang.h.
References klang::graph, and klang::Generic::Graph< SIZE >::plot().
|
inline |
Definition at line 3832 of file klang.h.
References klang::graph, and klang::Generic::Graph< SIZE >::plot().
|
inlineinherited |
Definition at line 2969 of file klang.h.
References klang::Generic::Output< SIGNAL >::out, and klang::Generic::Output< SIGNAL >::process().
|
inlinevirtualinherited |
|
inlineoverridevirtual |
Reimplemented from klang::Generic::Modifier< SIGNAL >.
Definition at line 3298 of file klang.h.
References klang::Generic::Function< SIGNAL, Args >::evaluate(), and klang::Generic::Output< SIGNAL >::out.
Referenced by klang::Generic::Function< SIGNAL, Args >::operator SIGNAL().
|
inlineinherited |
Definition at line 2981 of file klang.h.
References klang::Generic::Output< SIGNAL >::out.
|
inline |
|
inline |
Definition at line 3282 of file klang.h.
References klang::Generic::Function< SIGNAL, Args >::ARGS, klang::Generic::Function< SIGNAL, Args >::args(), klang::Generic::Input< SIGNAL >::in, and klang::Generic::Function< SIGNAL, Args >::inputs.
Referenced by klang::Generic::Function< SIGNAL, Args >::Function(), klang::Generic::Graph< SIZE >::operator<<(), klang::Graph::operator<<(), and klang::Generic::Graph< SIZE >::plot().
|
staticconstexpr |
Definition at line 3175 of file klang.h.
Referenced by klang::Generic::Function< SIGNAL, Args >::args(), klang::Generic::Function< SIGNAL, Args >::evaluate(), klang::Generic::Function< SIGNAL, Args >::operator()(), klang::Generic::Function< SIGNAL, Args >::operator()(), and klang::Generic::Function< SIGNAL, Args >::with().
| std::function<float(Args...)> klang::Generic::Function< SIGNAL, Args >::function |
Definition at line 3173 of file klang.h.
Referenced by klang::Generic::Function< SIGNAL, Args >::evaluate(), klang::Generic::Function< SIGNAL, Args >::operator float(), klang::Generic::Function< SIGNAL, Args >::operator param(), klang::Generic::Function< SIGNAL, Args >::operator SIGNAL(), and klang::Generic::Function< SIGNAL, Args >::operator()().
|
inherited |
Definition at line 2944 of file klang.h.
Referenced by klang::Generic::Function< SIGNAL, Args >::evaluate(), klang::Generic::Function< SIGNAL, Args >::input(), klang::Generic::Input< SIGNAL >::input(), klang::Generic::Input< SIGNAL >::input(), klang::Generic::Function< SIGNAL, Args >::operator()(), klang::Generic::Function< SIGNAL, Args >::operator()(), klang::Generic::Input< SIGNAL >::operator<<(), klang::Generic::Modifier< SIGNAL >::process(), and klang::Generic::Function< SIGNAL, Args >::with().
| std::tuple<Args...> klang::Generic::Function< SIGNAL, Args >::inputs |
Definition at line 3178 of file klang.h.
Referenced by klang::Generic::Function< SIGNAL, Args >::evaluate(), klang::Generic::Function< SIGNAL, Args >::input(), klang::Generic::Function< SIGNAL, Args >::operator()(), klang::Generic::Function< SIGNAL, Args >::operator()(), and klang::Generic::Function< SIGNAL, Args >::with().
|
inherited |
Definition at line 2961 of file klang.h.
Referenced by klang::Generic::Generator< SIGNAL >::operator const SIGNAL &(), klang::Generic::Generator< SIGNAL >::operator const SIGNAL &(), klang::Generic::Modifier< SIGNAL >::operator const SIGNAL &(), klang::Generic::Modifier< SIGNAL >::operator const SIGNAL &(), klang::Generic::Output< SIGNAL >::operator const SIGNAL &(), klang::Generic::Output< SIGNAL >::operator const SIGNAL &(), klang::Generic::Function< SIGNAL, Args >::operator float(), klang::Generic::Function< SIGNAL, Args >::operator param(), klang::Generic::Function< SIGNAL, Args >::operator SIGNAL(), klang::Generic::Function< SIGNAL, Args >::operator()(), klang::Generic::Output< SIGNAL >::operator>>(), klang::Generic::Output< SIGNAL >::output(), klang::Generic::Function< SIGNAL, Args >::process(), klang::Generic::Modifier< SIGNAL >::process(), and klang::Generic::Output< SIGNAL >::reset().