FastFlow (simple) pipeline

First of all,

#include <ff/pipeline.hpp>

and possibly

using namespace ff;

Pipelines may be created creating an ff_pipeline object:

ff_pipeline myPipe;

Stages may be added using the add_stage(ff_node*) (in order).

 
myPipe.add_stage(stage1); 
myPipe.add_stage(stage2);

A pipeline with all the stages added may be run by invoking the run_and_wait_end() method:

myPipe.run_and_wait_end();

Each stage returns:

The values may returned with a return or (in any part of the code) via a ff_send_out(…) call (may be called multiple times in a stage)