MetriVis | Overview | Download | User Manual | Development |
Reference | Overview | Design Documentation | Reference Backend | Reference Frontend |
#include <Pipeline.h>
Public Types | |
enum | { PL_PIPELINE_0 = 0, PL_PIPELINE_1, PL_PIPELINE_2, PL_PIPELINE_3, PL_PIPELINE_4, PL_PIPELINE_5 } |
< The pipeline indexes for the Pipeline::GetPipeline function. | |
Public Member Functions | |
Pipeline () | |
Default construcor. | |
virtual | ~Pipeline () |
Deconstructor. | |
void | Execute () |
Executes the pipeline. | |
void | Reset () |
Resets the pipeline. Safe for reuse after this call. | |
const std::string & | GetResult () const |
Returns the result of the pipeline. | |
PipelineProcess * | GetPipeline (int index) const |
Interface to local pipelines. | |
Protected Member Functions | |
void | AppendProcess (PipelineProcess *pipeline_process) |
Appends a PipelineProcess to the Pipeline after the last one. | |
void | ClearPipeline () |
Removes all registered PipelineProcesses from the Pipeline. | |
Protected Attributes | |
std::vector < PipelineProcess * > | pipeline_processes_ |
List of all processes. | |
std::string | result_ |
String containing the result of this pipeline. | |
Private Member Functions | |
Pipeline (const Pipeline &pipeline) | |
Pipeline | operator= (const Pipeline &pipeline) |
Pipeline encapuslates multiple PipelineProcesses and executes them in the same order they are added to the pipeline. The pipeline may process any sort of data but the result will always be a string representing a HTTP response that may be sent over the network.
metrivis::Pipeline::Pipeline | ( | ) | [inline] |
Default construcor.
Resets the pipeline to initial state.
virtual metrivis::Pipeline::~Pipeline | ( | ) | [inline, virtual] |
Deconstructor.
Clears the pipeline.
void metrivis::Pipeline::Execute | ( | ) |
Executes the pipeline.
Executes each PipelineProcess in the order they were added to the pipeline (FIFO). Time critical: make this function as fast as possible, it will influence request delay.
See header file for more infos.
void metrivis::Pipeline::Reset | ( | ) |
Resets the pipeline. Safe for reuse after this call.
The pipeline needs to be reset in order to be reused for different input data sets. Not time critical. It is suggested to call Pipeline::Reset also before the first use of the pipeline.
See header file for more infos.
const std::string & metrivis::Pipeline::GetResult | ( | ) | const |
Returns the result of the pipeline.
Appends a Process to the pipeline.
See header file for more infos.
PipelineProcess* metrivis::Pipeline::GetPipeline | ( | int | index | ) | const [inline] |
Interface to local pipelines.
index,: | The PipelinePriocess index to retrieve. |
void metrivis::Pipeline::AppendProcess | ( | PipelineProcess * | pipeline_process | ) | [protected] |
Appends a PipelineProcess to the Pipeline after the last one.
Appends a Process to the pipeline.
Adds the PipelineProcess to this Pipeline and connects it to the last procesess if there is any. Once a process is added, the Pipeline will take care about it's life time management (freeing memory).
See header file for more infos.
void metrivis::Pipeline::ClearPipeline | ( | ) | [protected] |
Removes all registered PipelineProcesses from the Pipeline.
Clears all processes from the pipeline.
Removes and the PipelineProcesses and frees the memory used by them.
See header file for more infos.