18 #include "scanner/api/sink.h" 19 #include "scanner/util/common.h" 32 SinkFactory(
const std::string& name,
bool variadic_inputs,
33 const std::vector<Column>& input_columns,
bool per_element_output,
34 bool entire_stream_output,
const std::string& protobuf_name,
35 const std::string& stream_protobuf_name,
36 SinkConstructor constructor)
38 variadic_inputs_(variadic_inputs),
39 input_columns_(input_columns),
40 per_element_output_(per_element_output),
41 entire_stream_output_(entire_stream_output),
42 protobuf_name_(protobuf_name),
43 stream_protobuf_name_(stream_protobuf_name),
44 constructor_(constructor) {}
46 const std::string& get_name()
const {
return name_; }
48 const bool variadic_inputs()
const {
return variadic_inputs_; }
50 const std::vector<Column>& input_columns()
const {
return input_columns_; }
52 const bool per_element_output()
const {
return per_element_output_; }
54 const bool entire_stream_output()
const {
return entire_stream_output_; }
56 const std::string& protobuf_name()
const {
return protobuf_name_; }
58 const std::string& stream_protobuf_name()
const {
59 return stream_protobuf_name_;
64 Sink* new_instance(
const SinkConfig& config) {
return constructor_(config); }
68 bool variadic_inputs_;
69 std::vector<Column> input_columns_;
70 bool per_element_output_;
71 bool entire_stream_output_;
72 std::string protobuf_name_;
73 std::string stream_protobuf_name_;
74 SinkConstructor constructor_;
Interface for reading data in a computation graph.
Definition: sink.h:42
Interface for constructing Sinks at runtime.
Definition: sink_factory.h:30
Definition: database.cpp:36
Parameters provided at instantiation of Sink node.
Definition: sink.h:28