20 #ifndef __TPIE_PIPELINING_FILTER_H__
21 #define __TPIE_PIPELINING_FILTER_H__
23 #include <tpie/pipelining/map.h>
24 #include <tpie/pipelining/node.h>
25 #include <tpie/pipelining/pipe_base.h>
26 #include <tpie/pipelining/factory_helpers.h>
27 #include <tpie/pipelining/node_name.h>
30 namespace pipelining {
36 template <
typename dest_t>
42 typedef typename std::decay<typename unary_traits<F>::argument_type>
::type funct_arg_type;
43 typedef typename push_type<dest_t, funct_arg_type>::type item_type;
44 type(dest_t dest,
const F & functor):
45 functor(functor), dest(std::move(dest)) {
46 set_name(bits::extract_pipe_name(
typeid(F).name()), PRIORITY_NO_NAME);
49 void push(
const item_type & item) {
71 #endif //__TPIE_PIPELINING_FILTER_H__
Node factory for variadic argument templated generators.
void set_name(const std::string &name, priority_type priority=PRIORITY_USER)
Set this node's name.
pipe_middle< tempfactory< bits::filter_t< F >, F > > filter(const F &functor)
A pipelining node that keeps only elements where functor evaluates to true.
A pipe_middle class pushes input down the pipeline.