20 #ifndef INCLUDE_FKIE_MESSAGE_FILTERS_SOURCE_H_ 21 #define INCLUDE_FKIE_MESSAGE_FILTERS_SOURCE_H_ 25 #include <boost/signals2.hpp> 30 template<
typename...>
class Sink;
43 template<
typename... Outputs>
44 class Source :
public virtual FilterBase
46 template<
typename...>
friend class Sink;
49 static constexpr std::size_t
NUM_OUTPUTS =
sizeof...(Outputs);
91 void send (
const Outputs&... out);
93 boost::signals2::signal<void(
const Outputs&...)>
signal_;
96 template<
typename... Outputs>
static constexpr std::size_t NUM_OUTPUTS
Number of output arguments.
Base class for data consumers.
boost::signals2::connection Connection
Tracks connections from sources to sinks.
Base class for data providers.
Group multiple data types as filter input or output.
void disconnect_from_all_sinks() noexcept
Disconnect from all connected sinks.
Connection connect_to_sink(Sink< Outputs... > &dst) noexcept
Connect this source to a sink.
void send(const Outputs &... out)
Pass data to all connected sinks.
virtual void disconnect() noexcept override
Disconnect from all connected sinks.
boost::signals2::signal< void(const Outputs &...)> signal_