Audio Processing Framework (APF) version 0.5.0
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
apf::CombineChannelsBase< Derived, ListProxy, Out > Class Template Reference

Base class for CombineChannels*. More...

#include <apf/combine_channels.h>

Inheritance diagram for apf::CombineChannelsBase< Derived, ListProxy, Out >:
Inheritance graph
[legend]

Public Member Functions

template<typename L >
 CombineChannelsBase (L &in, Out &out)
 Constructor. More...
 
template<typename F >
void process (F f)
 Do the actual combining. More...
 
void before_the_loop ()
 
template<typename ItemType , typename F >
void case_one (const ItemType &, F &)
 
template<typename ItemType , typename F >
void case_two (const ItemType &, F &)
 
void after_the_loop ()
 
- Public Member Functions inherited from apf::CRTP< Derived >
Derived & derived ()
 

Protected Types

using T = typename std::iterator_traits< typename std::remove_reference< ListProxy >::type::value_type::iterator >::value_type
 

Protected Member Functions

template<typename ItemType >
void _case_one_copy (const ItemType &item)
 
template<typename ItemType , typename FunctionType >
void _case_one_transform (const ItemType &item, FunctionType &f)
 
- Protected Member Functions inherited from apf::CRTP< Derived >
 ~CRTP ()=default
 Protected destructor to avoid base class pointers. More...
 

Protected Attributes

Out & _out
 
CombineChannelsResult::type _selection
 
bool _accumulate
 

Detailed Description

template<typename Derived, typename ListProxy, typename Out>
class apf::CombineChannelsBase< Derived, ListProxy, Out >

Base class for CombineChannels*.

Template Parameters
DerivedDerived class ("Curiously Recurring Template Pattern")
ListProxyProxy class for input list. If no proxy is needed, just use a reference to the list (e.g. std::list<myitem>&). ListProxy (or the list itself) must have begin() and end() and an inner type value_type which itself must have begin() and end() and an inner type iterator.
OutOutput class. Must have begin() and end() functions.
See also
CombineChannels, CombineChannelsCopy, CombineChannelsCrossfade, CombineChannelsCrossfadeCopy, CombineChannelsInterpolation

Definition at line 72 of file combine_channels.h.

Member Typedef Documentation

◆ T

template<typename Derived , typename ListProxy , typename Out >
using apf::CombineChannelsBase< Derived, ListProxy, Out >::T = typename std::iterator_traits<typename std::remove_reference< ListProxy>::type::value_type::iterator>::value_type
protected

Definition at line 75 of file combine_channels.h.

Constructor & Destructor Documentation

◆ CombineChannelsBase()

template<typename Derived , typename ListProxy , typename Out >
template<typename L >
apf::CombineChannelsBase< Derived, ListProxy, Out >::CombineChannelsBase ( L &  in,
Out &  out 
)
inline

Constructor.

Parameters
inList of objects to combine
outTarget object

Definition at line 83 of file combine_channels.h.

Member Function Documentation

◆ process()

template<typename Derived , typename ListProxy , typename Out >
template<typename F >
void apf::CombineChannelsBase< Derived, ListProxy, Out >::process ( f)
inline

Do the actual combining.

Parameters
fA "special" function object. It has to have a member function select() which takes an item of the list as parameter. Depending on the derived class, it may also need other member functions.

Definition at line 93 of file combine_channels.h.

◆ before_the_loop()

template<typename Derived , typename ListProxy , typename Out >
void apf::CombineChannelsBase< Derived, ListProxy, Out >::before_the_loop ( )
inline

Definition at line 135 of file combine_channels.h.

◆ case_one()

template<typename Derived , typename ListProxy , typename Out >
template<typename ItemType , typename F >
void apf::CombineChannelsBase< Derived, ListProxy, Out >::case_one ( const ItemType &  ,
F &   
)
inline

Definition at line 138 of file combine_channels.h.

◆ case_two()

template<typename Derived , typename ListProxy , typename Out >
template<typename ItemType , typename F >
void apf::CombineChannelsBase< Derived, ListProxy, Out >::case_two ( const ItemType &  ,
F &   
)
inline

Definition at line 144 of file combine_channels.h.

◆ after_the_loop()

template<typename Derived , typename ListProxy , typename Out >
void apf::CombineChannelsBase< Derived, ListProxy, Out >::after_the_loop ( )
inline

Definition at line 149 of file combine_channels.h.

◆ _case_one_copy()

template<typename Derived , typename ListProxy , typename Out >
template<typename ItemType >
void apf::CombineChannelsBase< Derived, ListProxy, Out >::_case_one_copy ( const ItemType &  item)
inlineprotected

Definition at line 156 of file combine_channels.h.

◆ _case_one_transform()

template<typename Derived , typename ListProxy , typename Out >
template<typename ItemType , typename FunctionType >
void apf::CombineChannelsBase< Derived, ListProxy, Out >::_case_one_transform ( const ItemType &  item,
FunctionType &  f 
)
inlineprotected

Definition at line 171 of file combine_channels.h.

Member Data Documentation

◆ _out

template<typename Derived , typename ListProxy , typename Out >
Out& apf::CombineChannelsBase< Derived, ListProxy, Out >::_out
protected

Definition at line 185 of file combine_channels.h.

◆ _selection

template<typename Derived , typename ListProxy , typename Out >
CombineChannelsResult::type apf::CombineChannelsBase< Derived, ListProxy, Out >::_selection
protected

Definition at line 186 of file combine_channels.h.

◆ _accumulate

template<typename Derived , typename ListProxy , typename Out >
bool apf::CombineChannelsBase< Derived, ListProxy, Out >::_accumulate
protected

Definition at line 187 of file combine_channels.h.


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