20 #ifndef __TPIE_PIPELINING_CHUNKER_H__
21 #define __TPIE_PIPELINING_CHUNKER_H__
23 #include <tpie/pipelining/node.h>
24 #include <tpie/pipelining/pipe_base.h>
25 #include <tpie/pipelining/factory_helpers.h>
26 #include <tpie/pipelining/node_name.h>
29 namespace pipelining {
32 template <
typename dest_t>
36 typedef typename vector_type::value_type item_type;
44 , dest(std::move(dest))
47 set_name(
"Chunker", PRIORITY_INSIGNIFICANT);
56 items.reserve(maxSize);
59 void push(
const item_type & item) {
60 if (items.size() == maxSize) flush();
61 items.push_back(item);
65 if (!items.empty()) flush();
81 #endif //__TPIE_PIPELINING_CHUNKER_H__
void end() override
End pipeline processing phase.
Class to deduce the item_type of a node of type T.
pipe_middle< factory< bits::chunker_t, size_t > > chunker
A pipelining node that gathers elements into a vector of some size.
void set_name(const std::string &name, priority_type priority=PRIORITY_USER)
Set this node's name.
void set_minimum_memory(memory_size_type minimumMemory)
Called by implementers to declare minimum memory requirements.
A pipe_middle class pushes input down the pipeline.
void begin() override
Begin pipeline processing phase.
void free_structure_memory(T &v)
Free the memory assosiated with a stl or tpie structure by swapping it with a default constructed str...