MetriVis Overview | Download | User Manual | Development
Reference Overview | Design Documentation | Reference Backend | Reference Frontend

metrivis::Pipeline Class Reference

Pipeline is a container for PipelineProcess es. More...

#include <Pipeline.h>

Inheritance diagram for metrivis::Pipeline:

metrivis::SearchPipeline metrivis::SQL2JsonPipeline metrivis::TimeLinePipeline metrivis::XYPlotPipeline

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.
PipelineProcessGetPipeline (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)

Detailed Description

Pipeline is a container for PipelineProcess es.

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.


Constructor & Destructor Documentation

metrivis::Pipeline::Pipeline (  )  [inline]

Default construcor.

Resets the pipeline to initial state.

virtual metrivis::Pipeline::~Pipeline (  )  [inline, virtual]

Deconstructor.

Clears the pipeline.


Member Function Documentation

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.

Returns:
the result of the pipeline as a string.
The result string may contain any type of data. It may be a HTML page, a zipped CSV file or a PNG file. It will be sent back to the client as a HTTP response.

See header file for more infos.

PipelineProcess* metrivis::Pipeline::GetPipeline ( int  index  )  const [inline]

Interface to local pipelines.

Parameters:
index,: The PipelinePriocess index to retrieve.
Returns:
Pointer to the PipelineProcess.

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.


The documentation for this class was generated from the following files:
Generated on Fri Feb 29 16:47:20 2008 for MetriVis by  doxygen 1.5.3