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

Signal modifier object (input-output) More...

#include <klang.h>

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

Public Member Functions

virtual ~Modifier ()
 
 operator const SIGNAL & () override
 
 operator const SIGNAL & () const override
 
virtual void process () 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 >
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 in = { 0.f }
 
SIGNAL out = { 0.f }
 

Detailed Description

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

Definition at line 1442 of file klang.h.

Constructor & Destructor Documentation

◆ ~Modifier()

template<typename SIGNAL >
virtual klang::Generic::Modifier< SIGNAL >::~Modifier ( )
inlinevirtual

Reimplemented in klang::Stereo::Modifier.

Definition at line 1446 of file klang.h.

1446{ }

Member Function Documentation

◆ input() [1/3]

template<typename SIGNAL >
virtual void klang::Generic::Input< SIGNAL >::input ( )
inlineprotectedvirtualinherited

◆ input() [2/3]

template<typename SIGNAL >
virtual const SIGNAL & klang::Generic::Input< SIGNAL >::input ( ) const
inlinevirtualinherited

Reimplemented in klang::Generic::Graph< SIZE >::Series.

Definition at line 1343 of file klang.h.

1343{ return in; }

References klang::Generic::Input< SIGNAL >::in.

◆ input() [3/3]

template<typename SIGNAL >
virtual void klang::Generic::Input< SIGNAL >::input ( const SIGNAL & source)
inlinevirtualinherited

Definition at line 1347 of file klang.h.

1347{ in = source; input(); }
virtual const SIGNAL & input() const
Definition klang.h:1343

References klang::Generic::Input< SIGNAL >::in.

Referenced by klang::Effect::process(), and klang::Stereo::Effect::process().

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

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

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

Definition at line 1450 of file klang.h.

1450{ return out; } // return last output

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

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

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

Definition at line 1449 of file klang.h.

1449{ process(); return out; } // return processed output
virtual void process() override
Definition klang.h:1453

References klang::Generic::Modifier< SIGNAL >::process().

◆ operator()()

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

Definition at line 1457 of file klang.h.

1457 {
1458 set(p...); return *this;
1459 }

◆ 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); }
virtual void process()=0

◆ 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 >
virtual void klang::Generic::Input< SIGNAL >::operator<< ( const SIGNAL & source)
inlinevirtualinherited

Definition at line 1346 of file klang.h.

1346{ in = source; input(); }

References klang::Generic::Input< SIGNAL >::in.

◆ 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

◆ in

template<typename SIGNAL >
SIGNAL klang::Generic::Input< SIGNAL >::in = { 0.f }
inherited

◆ out