20 #ifndef __TPIE_PIPELINING_MERGE_H__
21 #define __TPIE_PIPELINING_MERGE_H__
23 #include <tpie/pipelining/pipe_base.h>
24 #include <tpie/pipelining/factory_helpers.h>
28 namespace pipelining {
39 template <
typename fact_t>
42 typedef typename fact_t::constructed_type pull_t;
44 template <
typename dest_t>
47 typedef typename dest_t::item_type item_type;
49 inline type(
const dest_t & dest,
const fact_t & fact) : dest(dest), with(fact.construct()) {
52 set_name(
"Merge", PRIORITY_INSIGNIFICANT);
55 inline void push(
const item_type & item) {
57 dest.push(with.pull());
67 template <
typename pull_t>
void add_pull_source(const node_token &dest)
Called by implementers to declare a pull source.
Merge a pull pipeline into a push pipeline.
void add_push_destination(const node_token &dest)
Called by implementers to declare a push destination.
void set_name(const std::string &name, priority_type priority=PRIORITY_USER)
Set this node's name.
Node factory for 1-argument generator.
A pipe_middle class pushes input down the pipeline.