Elementa v8.0.0
Minimalistic library for any C++ application (C++11 and up)
Loading...
Searching...
No Matches
filters.h File Reference
#include "elementa/license.inc"
#include "elementa/checks.inc"
#include <functional>
#include <type_traits>
#include "elementa/base/debugging.h"
#include "elementa/base/enums.h"
#include "elementa/base/serial_channels/basics.h"
Include dependency graph for filters.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  elementa::base::SerChIFilter< F >
 A filter for InSerCh. It filters their inputs after getting or putbacking'em. More...
 
class  elementa::base::SerChOFilter< F >
 A filter for output channels. It processes their outputs before writing them. More...
 
class  elementa::base::SerChIOFilter< FI, FO >
 A double filter for input/output channels. More...
 
class  elementa::base::SerChFilt_Loc
 A filter to keep a location on a channel. More...
 
class  elementa::base::SerChFilt_Demux
 A filter that serves data from multiple input channels. More...
 
class  elementa::base::SerChFilt_Divert
 A filter that sends a copy of the readings of an InSerCh to another channel. More...
 

Functions

 elementa::base::ELE_CLASS_ENUM (SerChBufOp, kUFlow, kUnderflow, kPBackFail, kOverflow)
 The different buffer operations that may produce the filter to be called.
 
template<class F >
SerChDatum elementa::base::serch_filtered_uflow (InSerCh &wrappingchin_, InSerCh &chin_, F &filter_)
 Intended to implement uflow() in input or inout channels filtered by FILTER_. More...
 
template<class F >
SerChDatum elementa::base::serch_filtered_underflow (InSerCh &wrappingchin_, InSerCh &chin_, F &filter_)
 Intended to implement underflow() in input/inout chnnels filtered by FILTER_. More...
 
template<class F >
SerChDatum elementa::base::serch_filtered_pbackfail (InSerCh &wrappingchin_, InSerCh &chin_, F &filter_, SerChDatum c)
 Intended to implement pbackfail() in input/inout chnnels filtered by FILTER_. More...
 
template<class F >
SerChDatum elementa::base::serch_filtered_overflow (OutSerCh &wrappingchout_, OutSerCh &chout_, F &filter_, SerChDatum c)
 Intended to implement overflow() in output/inout chnnels filtered by FILTER_. More...
 
template<class F >
SerChIFilter< F > elementa::base::make_schfiltI (InSerCh &sch, const F &f)
 Creator of a SerChIFilter that deduces automatically the type of the filter. More...
 
template<class F >
SerChOFilter< F > elementa::base::make_schfiltO (OutSerCh &sch, const F &f)
 Creator of a SerChOFilter that deduces automatically the type of the filter. More...
 
template<class FI , class FO >
SerChIOFilter< FI, FO > elementa::base::make_schfiltIO (InOutSerCh &sch, const FI &f1, const FO &f2)
 Creator of a SerChIOFilter that deduces automatically the type of the filter. More...
 

Variables

std::function< SerChDatum(RootSerCh &, SerChBufOp, SerChDatum) > elementa::base::serchfilt_null
 Change nothing in the flow of the channel.
 
std::function< SerChDatum(RootSerCh &, SerChBufOp, SerChDatum) > elementa::base::serchfilt_toupper
 Change to uppercase everything flowing through the channel.
 
std::function< SerChDatum(RootSerCh &, SerChBufOp, SerChDatum) > elementa::base::serchfilt_tolower
 Change to lowercase everything flowing through the channel.