20 #ifndef __TPIE_PIPELINING_AMI_GLUE_H__
21 #define __TPIE_PIPELINING_AMI_GLUE_H__
25 namespace pipelining {
29 template <
typename dest_t>
32 typedef typename dest_t::item_type item_type;
34 : stream(stream), dest(std::move(dest)) {}
37 forward(
"items", (stream_size_type)stream.stream_len());
59 template <
typename dest_t>
62 typedef typename dest_t::item_type item_type;
64 : stack(stack), dest(std::move(dest)) {}
72 const item_type *item;
102 const item_type *item;
117 template <
typename T>
123 set_name(
"Write", PRIORITY_INSIGNIFICANT);
126 inline void push(
const T & item) {
127 stream.write_item(item);
152 inline pipe_begin<factory<bits::ami_input_stack_t, tpie::ami::stack<T> &> >
171 template <
typename T>
file_stream output terminator.
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...
An implementation of an external-memory stack.
TPIE_OS_OFFSET size() const
Returns the number of items currently on the stack.
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.
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...
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.
Node factory for variadic argument terminators.
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...
void step(stream_size_type steps=1)
Step the progress indicator.
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.
bool is_empty() const
Returns whether the stack is empty or not.
err pop(const T **t)
Pops one item from the stack.
Node factory for variadic argument generators.
void set_steps(stream_size_type steps)
Called by implementers that intend to call step().