9#include "introspect.hpp"
43 return stream <<
event.message;
55 never_event() =
delete;
81 template <
typename Event>
void handle(Event
const & ) {}
91 Downstream downstream;
94 explicit null_source(Downstream downstream)
95 : downstream(std::move(downstream)) {}
97 [[nodiscard]]
auto introspect_node() const -> processor_info {
98 return processor_info(
this,
"null_source");
101 [[nodiscard]]
auto introspect_graph() const -> processor_graph {
102 return downstream.introspect_graph().push_entry_point(
this);
107 throw std::logic_error(
108 "null_source may not be flushed a second time");
131template <
typename Downstream>
auto null_source(Downstream downstream) {
132 return internal::null_source<Downstream>(std::move(downstream));
Processor that sinks any event and the end-of-stream and does nothing.
Definition core.hpp:68
void handle(Event const &)
Implements processor requirement.
Definition core.hpp:81
void flush()
Implements processor requirement.
Definition core.hpp:84
auto introspect_graph() const -> processor_graph
Implements processor requirement.
Definition core.hpp:76
auto introspect_node() const -> processor_info
Implements processor requirement.
Definition core.hpp:71
Value type representing a directed acyclic graph of processors.
Definition introspect.hpp:198
auto push_entry_point(Processor const *processor) -> processor_graph &
Add a processor node to this graph, upstream of the current entry point (if any), making it the new e...
Definition introspect.hpp:229
Value type representing metadata of a processor.
Definition introspect.hpp:58
auto null_source(Downstream downstream)
Create a processor that sources an empty stream.
Definition core.hpp:131
libtcspc namespace.
Definition acquire.hpp:29
An event type indicating a warning.
Definition core.hpp:31
friend auto operator==(warning_event const &lhs, warning_event const &rhs) noexcept -> bool=default
Equality comparison operator.
friend auto operator<<(std::ostream &stream, warning_event const &event) -> std::ostream &
Stream insertion operator.
Definition core.hpp:41
std::string message
A human-readable message describing the warning.
Definition core.hpp:33