IDS peak ICV v1.2.0
Loading...
Searching...
No Matches
PipelineBase Class Referenceabstract

#include <peak_common/pipeline/peak_common_pipeline_base.hpp>

Inheritance diagram for PipelineBase:

Public Member Functions

void ExportSettingsToFile (const std::string &filePath) const override
 Saves the current settings of the pipeline and its modules to a file.
 
void ImportSettingsFromFile (const std::string &filePath) override
 Loads the settings of the pipeline and its modules from a file.
 
peak::common::Any operator<< (const peak::common::Any &input) override
 Convenience operator for processing input using the pipeline.
 
peak::common::Any Process (const peak::common::Any &input) const override
 Processes the input through all pipeline modules and returns the result.
 
virtual std::string ExportSettingsToString () const =0
 Returns the current settings of the pipeline and its modules as a string.
 
virtual void ImportSettingsFromString (const std::string &settings)=0
 Loads settings for the pipeline and its modules from a string.
 
virtual void ResetToDefault ()=0
 Resets the pipeline and its modules to their default state.
 
virtual const char * GetType () const =0
 Returns the type identifier of the pipeline.
 

Detailed Description

Base class for implementing a custom pipeline.

Provides a partial implementation of the IPipeline interface. Can be used as a foundation for creating custom pipeline behavior.

Since
ids_peak_common 1.0

Definition at line 34 of file peak_common_pipeline_base.hpp.

Member Function Documentation

◆ ExportSettingsToFile()

void ExportSettingsToFile ( const std::string & filePath) const
inlineoverridevirtual

Saves the current settings of the pipeline and its modules to a file.

This base implementation calls ExportSettingsToString() and writes the resulting string to the specified file path.

Parameters
filePathPath to the file where the settings should be saved.
Since
ids_peak_common 1.0

Implements IPipeline.

Definition at line 77 of file peak_common_pipeline_base.hpp.

◆ ExportSettingsToString()

virtual std::string ExportSettingsToString ( ) const
pure virtualinherited

Returns the current settings of the pipeline and its modules as a string.

Returns
A string representation of the pipeline settings.
Since
ids_peak_common 1.0

Implemented in DefaultPipeline.

◆ GetType()

virtual const char * GetType ( ) const
pure virtualinherited

Returns the type identifier of the pipeline.

This is a unique string used to identify the specific pipeline implementation.

Returns
A null-terminated string representing the pipeline type.
Since
ids_peak_common 1.0

Implemented in DefaultPipeline.

◆ ImportSettingsFromFile()

void ImportSettingsFromFile ( const std::string & filePath)
inlineoverridevirtual

Loads the settings of the pipeline and its modules from a file.

This base implementation reads the file contents and passes them to ImportSettingsFromString() to restore the pipeline state.

Parameters
filePathPath to the file from which settings should be loaded.
Since
ids_peak_common 1.0

Implements IPipeline.

Definition at line 94 of file peak_common_pipeline_base.hpp.

◆ ImportSettingsFromString()

virtual void ImportSettingsFromString ( const std::string & settings)
pure virtualinherited

Loads settings for the pipeline and its modules from a string.

Parameters
settingsString containing serialized pipeline settings.
Since
ids_peak_common 1.0

Implemented in DefaultPipeline.

◆ operator<<()

peak::common::Any operator<< ( const peak::common::Any & input)
inlineoverridevirtual

Convenience operator for processing input using the pipeline.

This base implementation simply redirects to the Process() method.

Equivalent to calling Process(input).

Parameters
inputThe input to process.
Returns
The processed input.
Since
ids_peak_common 1.0

Implements IPipeline.

Definition at line 114 of file peak_common_pipeline_base.hpp.

◆ Process()

peak::common::Any Process ( const peak::common::Any & input) const
inlineoverridevirtual

Processes the input through all pipeline modules and returns the result.

This base implementation iterates over all modules using GetModules(), calling each module's Process() method in sequence and passing the result along.

The input is passed through each module in sequence.

Parameters
inputThe input to process.
Returns
The processed input.
Since
ids_peak_common 1.0

Implements IPipeline.

Definition at line 119 of file peak_common_pipeline_base.hpp.

◆ ResetToDefault()

virtual void ResetToDefault ( )
pure virtualinherited

Resets the pipeline and its modules to their default state.

Since
ids_peak_common 1.0

Implemented in DefaultPipeline.