Protected Member Functions | List of all members
fkie_message_filters::Selector< IO< Inputs... >, Is... > Class Template Reference

Reorder or reduce an N-ary filter. More...

#include <selector.h>

Inheritance diagram for fkie_message_filters::Selector< IO< Inputs... >, Is... >:
Inheritance graph
[legend]

Protected Member Functions

void receive (const Inputs &... in) override
 Process incoming data. More...
 
- Protected Member Functions inherited from fkie_message_filters::Source< IO< Inputs... >::template Select< Is... > >
void send (const Outputs &... out)
 Pass data to all connected sinks. More...
 

Additional Inherited Members

- Public Types inherited from fkie_message_filters::Sink< Inputs... >
using Input = IO< Inputs... >
 Grouped input types. More...
 
- Public Types inherited from fkie_message_filters::Source< IO< Inputs... >::template Select< Is... > >
using Output = IO< Outputs... >
 Grouped output types. More...
 
- Public Member Functions inherited from fkie_message_filters::Sink< Inputs... >
Connection connect_to_source (Source< Inputs... > &src) noexcept
 Connect this sink to a source. More...
 
void disconnect_from_all_sources () noexcept
 Disconnect from all connected sources. More...
 
virtual ~Sink ()
 
- Public Member Functions inherited from fkie_message_filters::FilterBase
virtual void reset () noexcept
 Reset filter state. More...
 
virtual ~FilterBase ()
 
- Public Member Functions inherited from fkie_message_filters::Source< IO< Inputs... >::template Select< Is... > >
Connection connect_to_sink (Sink< Outputs... > &dst) noexcept
 Connect this source to a sink. More...
 
void disconnect_from_all_sinks () noexcept
 Disconnect from all connected sinks. More...
 
virtual ~Source ()
 
- Static Public Attributes inherited from fkie_message_filters::Sink< Inputs... >
static constexpr std::size_t NUM_INPUTS
 Number of input arguments. More...
 
- Static Public Attributes inherited from fkie_message_filters::Source< IO< Inputs... >::template Select< Is... > >
static constexpr std::size_t NUM_OUTPUTS
 Number of output arguments. More...
 

Detailed Description

template<class... Inputs, std::size_t... Is>
class fkie_message_filters::Selector< IO< Inputs... >, Is... >

Reorder or reduce an N-ary filter.

This filter reorders the arguments of an N-ary filter and/or chooses an arbitrary subset of the input arguments. The output arguments are selected from the input by index. The following example reduces a ternary filter to a binary filter of the first two arguments, in swapped order:

using BufferIn = mf::Buffer<T0, T1, T2>;
using BufferOut = mf::Buffer<T1, T0>;
BufferIn buf_in;
Select select;
BufferOut buf_out;
mf::chain(buf_in, select, buf_out);
See also
Divider, Combiner

Definition at line 72 of file selector.h.

Member Function Documentation

◆ receive()

template<class... Inputs, std::size_t... Is>
void fkie_message_filters::Selector< IO< Inputs... >, Is... >::receive ( const Inputs &...  in)
overrideprotectedvirtual

Process incoming data.

Derived classes need to override this method to handle all data that is to be consumed by the sink.

\abstractthrow

Implements fkie_message_filters::Sink< Inputs... >.

Definition at line 47 of file selector_impl.h.


The documentation for this class was generated from the following files:
fkie_message_filters
Definition: buffer.h:33
fkie_message_filters::chain
void chain(Filter1 &flt1, Filter2 &flt2, MoreFilters &... filters) noexcept
Convenience function to chain multiple filters.
Definition: filter_impl.h:71
fkie_message_filters::Selector
Definition: selector.h:48
fkie_message_filters::Buffer
Store and forward data.
Definition: buffer.h:121


fkie_message_filters
Author(s): Timo Röhling
autogenerated on Wed Mar 2 2022 00:18:57