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;
39 inline scanf_ints_t(dest_t dest) : dest(std::move(dest)) {
43 virtual void go()
override {
45 while (scanf(
"%d", &in) == 1) {
56 typedef int item_type;
61 inline void push(item_type i) {
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.
pipe_begin< factory< bits::scanf_ints_t > > scanf_ints
A pipelining node that pushes the integers it reads using scanf.
pipe_end< termfactory< bits::printf_ints_t > > printf_ints
A pipelining node that prints the items that are pushed to it.