Go to the documentation of this file.
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);
54 using Output = IO<Outputs...>;
91 void send (const Outputs&... out);
93 boost::signals2::signal<
void(const Outputs&...)>
signal_;
96 template<typename... Outputs>
97 class Source<IO<Outputs...>> : public Source<Outputs...>
void send(const Outputs &... out)
Pass data to all connected sinks.
IO< Outputs... > Output
Grouped output types.
static constexpr std::size_t NUM_OUTPUTS
Number of output arguments.
void disconnect_from_all_sinks() noexcept
Disconnect from all connected sinks.
boost::signals2::connection Connection
Tracks connections from sources to sinks.
boost::signals2::signal< void(const Outputs &...)> signal_
virtual void disconnect() noexcept override
Disconnect from all connected sinks.
Connection connect_to_sink(Sink< Outputs... > &dst) noexcept
Connect this source to a sink.