20 #ifndef __TPIE_PIPELINING_STDIO_H__
21 #define __TPIE_PIPELINING_STDIO_H__
23 #include <tpie/pipelining/node.h>
24 #include <tpie/pipelining/pipe_base.h>
25 #include <tpie/pipelining/factory_helpers.h>
30 namespace pipelining {
34 template <
typename dest_t>
37 typedef int item_type;
41 set_name(
"Read", PRIORITY_INSIGNIFICANT);
44 virtual void go()
override {
46 while (scanf(
"%d", &in) == 1) {
57 typedef int item_type;
60 set_name(
"Write", PRIORITY_INSIGNIFICANT);
63 inline void push(item_type i) {
75 pipe_end<termfactory_0<bits::printf_ints_t> >
76 inline printf_ints() {
77 return termfactory_0<bits::printf_ints_t>();
void add_push_destination(const node_token &dest)
Called by implementers to declare a push destination.
virtual void go() override
For initiator nodes, execute this phase by pushing all items to be pushed.
void set_name(const std::string &name, priority_type priority=PRIORITY_USER)
Set this node's name.
Node factory for 0-argument generator.