Klang C++ 0.7.15
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 , 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

SIGNAL in = { 0.f }
 
SIGNAL out = { 0.f }
 

Detailed Description

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

Definition at line 3083 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 3087 of file klang.h.

3087{}

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 2947 of file klang.h.

2947{ return in; }

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

Referenced by klang::Generic::Input< SIGNAL >::operator<<().

◆ input() [3/3]

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

Reimplemented in klang::Debug.

Definition at line 2951 of file klang.h.

2951{ in = source; this->input(); }
virtual const SIGNAL & input() const
Definition klang.h:2947

References klang::Generic::Input< SIGNAL >::in, and klang::Generic::Input< SIGNAL >::input().

Referenced by klang::Generic::Input< SIGNAL >::input().

◆ 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 3091 of file klang.h.

3091{ return out; } // return last output

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

◆ 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 3090 of file klang.h.

3090{ this->process(); return out; } // return processed output
virtual void process() override
Definition klang.h:3094

References klang::Generic::Output< SIGNAL >::out, and 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 3098 of file klang.h.

3098 {
3099 set(std::forward<params>(p)...); return *this;
3100 }

◆ operator*()

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

Definition at line 2977 of file klang.h.

2977{ this->process(); return out * SIGNAL(other); }
virtual void process()=0

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

◆ operator+()

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

Definition at line 2976 of file klang.h.

2976{ this->process(); return out + SIGNAL(other); }

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

◆ operator-()

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

Definition at line 2978 of file klang.h.

2978{ this->process(); return out - SIGNAL(other); }

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

◆ operator/()

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

Definition at line 2979 of file klang.h.

2979{ this->process(); return out / SIGNAL(other); }

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

◆ operator<<()

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

Reimplemented in klang::Debug.

Definition at line 2950 of file klang.h.

2950{ in = source; this->input(); }

References klang::Generic::Input< SIGNAL >::in, and klang::Generic::Input< SIGNAL >::input().

◆ operator>>()

template<typename SIGNAL >
template<typename TYPE , class = decltype( std::declval<TYPE&>() = std::declval<SIGNAL&>())>
TYPE & klang::Generic::Output< SIGNAL >::operator>> ( TYPE & destination)
inlineinherited

Definition at line 2969 of file klang.h.

2969{ this->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 2964 of file klang.h.

2964{ return out; }

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

◆ process()

◆ reset()

template<typename SIGNAL >
void klang::Generic::Output< SIGNAL >::reset ( )
inlineinherited

Definition at line 2981 of file klang.h.

2981{ out = 0; }

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

Member Data Documentation

◆ in

◆ out