20 #ifndef __TPIE_PIPELINING_AMI_GLUE_H__
21 #define __TPIE_PIPELINING_AMI_GLUE_H__
27 template <
typename dest_t>
30 typedef typename dest_t::item_type item_type;
32 : stream(stream), dest(std::move(dest)) {}
35 forward(
"items", (stream_size_type)stream.stream_len());
57 template <
typename dest_t>
60 typedef typename dest_t::item_type item_type;
70 const item_type *item;
96 return !
stack.is_empty();
115 template <
typename T>
121 set_name(
"Write", PRIORITY_INSIGNIFICANT);
124 void push(
const T & item) {
125 stream.write_item(item);
150 inline pipe_begin<factory<bits::ami_input_stack_t, tpie::ami::stack<T> &> >
169 template <
typename T>
pipelining/factory_base.h Base class of pipelining factories
const T & pop()
Pops one item from the stack.
pipe_end< termfactory< bits::ami_output_t< T >, tpie::ami::stream< T > & > > ami_output(tpie::ami::stream< T > &fs)
A pipelining node that writes the pushed items to an ami stream.
pullpipe_begin< termfactory< bits::pull_input_t< T >, tpie::ami::stack< T > & > > ami_pull_input_stack(tpie::ami::stack< T > &fs)
A pipelining pull-node that reads items from the given ami::stack.
stream_size_type size() const
Returns the number of items currently on the stack.
@ NO_ERROR
No error occurred.
An implementation of an external-memory stack.
void forward(std::string key, T value, memory_size_type k=std::numeric_limits< memory_size_type >::max())
Called by implementers to forward auxiliary data to successors.
void set_name(const std::string &name, priority_type priority=PRIORITY_USER)
Set this node's name.
void step(stream_size_type steps=1)
Step the progress indicator.
void set_steps(stream_size_type steps)
Called by implementers that intend to call step().
pipe_begin< factory< bits::input_t, file_stream< T > &, stream_options > > input(file_stream< T > &fs, stream_options options=stream_options())
Pipelining nodes that pushes the contents of the given file stream to the next node in the pipeline.
pipe_middle< tfactory< bits::item_type_t, Args< T > > > item_type()
Create item type defining identity pipe node.
pipe_begin< factory< bits::ami_input_t, tpie::ami::stream< T > & > > ami_input(tpie::ami::stream< T > &input)
Pipelining nodes that pushes the contents of the given ami::stream to the next node in the pipeline.
pipe_begin< factory< bits::ami_input_stack_t, tpie::ami::stack< T > & > > ami_input_stack(tpie::ami::stack< T > &input)
Pipelining nodes that pushes the contents of the given ami::stack to the next node in the pipeline.