Klang C++
Language Reference (draft)
Loading...
Searching...
No Matches
klang::Generic::Generator< SIGNAL >abstract

Signal generator object (output only) More...

#include <klang.h>

+ Inheritance diagram for klang::Generic::Generator< SIGNAL >:

Public Member Functions

template<typename... params>
Output< SIGNAL > & operator() (params... p)
 
 operator const SIGNAL & () override
 
 operator const SIGNAL & () const override
 
virtual const SIGNAL & output () const
 
template<typename TYPE >
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)
 

Public Attributes

SIGNAL out = { 0.f }
 

Detailed Description

template<typename SIGNAL>
struct klang::Generic::Generator< SIGNAL >

Definition at line 1404 of file klang.h.

Member Function Documentation

◆ operator const SIGNAL &() [1/2]

template<typename SIGNAL >
klang::Generic::Generator< SIGNAL >::operator const SIGNAL & ( ) const
inlineoverridevirtual

Reimplemented from klang::Generic::Output< SIGNAL >.

Definition at line 1416 of file klang.h.

1416{ return out; } // return last output

◆ operator const SIGNAL &() [2/2]

template<typename SIGNAL >
klang::Generic::Generator< SIGNAL >::operator const SIGNAL & ( )
inlineoverridevirtual

Reimplemented from klang::Generic::Output< SIGNAL >.

Definition at line 1415 of file klang.h.

1415{ process(); return out; } // return processed output
virtual void process()=0

◆ operator()()

template<typename SIGNAL >
template<typename... params>
Output< SIGNAL > & klang::Generic::Generator< SIGNAL >::operator() ( params... p)
inline

Definition at line 1409 of file klang.h.

1409 {
1410 set(p...); return *this;
1411 }

◆ operator*()

template<typename SIGNAL >
template<typename TYPE >
SIGNAL klang::Generic::Output< SIGNAL >::operator* ( TYPE & other)
inlineinherited

Definition at line 1372 of file klang.h.

1372{ process(); return out * (other); }

◆ operator+()

template<typename SIGNAL >
template<typename TYPE >
SIGNAL klang::Generic::Output< SIGNAL >::operator+ ( TYPE & other)
inlineinherited

Definition at line 1371 of file klang.h.

1371{ process(); return out + (other); }

◆ operator-()

template<typename SIGNAL >
template<typename TYPE >
SIGNAL klang::Generic::Output< SIGNAL >::operator- ( TYPE & other)
inlineinherited

Definition at line 1373 of file klang.h.

1373{ process(); return out - (other); }

◆ operator/()

template<typename SIGNAL >
template<typename TYPE >
SIGNAL klang::Generic::Output< SIGNAL >::operator/ ( TYPE & other)
inlineinherited

Definition at line 1374 of file klang.h.

1374{ process(); return out / (other); }

◆ operator>>()

template<typename SIGNAL >
template<typename TYPE >
TYPE & klang::Generic::Output< SIGNAL >::operator>> ( TYPE & destination)
inlineinherited

Definition at line 1364 of file klang.h.

1364{ process(); return destination = out; }

References klang::Generic::Output< SIGNAL >::out, and klang::Generic::Output< SIGNAL >::process().

◆ output()

template<typename SIGNAL >
virtual const SIGNAL & klang::Generic::Output< SIGNAL >::output ( ) const
inlinevirtualinherited

Definition at line 1360 of file klang.h.

1360{ return out; }

References klang::Generic::Output< SIGNAL >::out.

◆ process()

Member Data Documentation

◆ out