PrevUpHomeNext

Class template segment<terminated, Output>

boost::pipeline::segment<terminated, Output>

Synopsis

// In header: <boost/pipeline/type_erasure.hpp>

template<typename Output> 
class segment<terminated, Output> {
public:
  // types
  typedef terminated root_type; 
  typedef Output     value_type;

  // construct/copy/destruct
  segment(const segment< terminated, Output > &);
  segment(unspecified);

  // public member functions
  template<typename NewOutput> 
    segment< terminated, NewOutput > 
    operator|(const segment< Output, NewOutput > &) const;
  void run(thread_pool &, const queue_back< Output > &);
};

Description

Left terminated series of transformations producing Output type of items at the end.

Connect this segment to a segment<Output, terminated> segment to create a runnable plan.

segment public construct/copy/destruct

  1. segment(const segment< terminated, Output > & rhs);

    Copy constructor

  2. segment(unspecified impl);

    Creates a segment from any kind of matching segment of unspecified type.

    segment<terminated, std::string> s1 = from(lines) | trim;
    

    Parameters:

    impl

    Any kind of left-terminated segment producing Output

segment public member functions

  1. template<typename NewOutput> 
      segment< terminated, 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.

  2. 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.


PrevUpHomeNext