boost::pipeline::segment
// In header: <boost/pipeline/type_erasure.hpp> template<typename Input, typename Output> class segment { public: // types typedef Input root_type; typedef Output value_type; // construct/copy/destruct segment(const segment< Input, Output > &); segment(unspecified); // public member functions template<typename NewOutput> segment< Input, NewOutput > operator|(const segment< Output, NewOutput > &) const; void run(thread_pool &, const queue_back< Output > &); };
Left-Right open series of transformations, the first consuming Input
items and the last producing Output
items.
Connect this segment to segment<terminated, Input>
and segment<Output, terminated>
segments to create a runnable plan.
segment
public
construct/copy/destructsegment(const segment< Input, Output > & rhs);
Copy constructor
segment(unspecified impl);
Creates a segment from an open segment of unspecified type.
segment<std::string, std::size_t> s1 = make(length);
Parameters: |
|
segment
public member functionstemplate<typename NewOutput> segment< Input, NewOutput > operator|(const segment< Output, NewOutput > & rhs) const;
Produces a new segment by concatenating rhs
after this segment. Please note, this
and rhs
remains unchanged.
void run(thread_pool & pool, const queue_back< Output > & target);
Schedules this segment on pool
and writes the produced output to target
. This method is typically called by the library.
Requires: |
Segment must be connected to a parent segment, the uppermost parent must be left-terminated. |