IDS peak genericC++ v1.15.0
Loading...
Searching...
No Matches
peak::pipeline::PipelineBase Class Reference

Base class for implementing a custom pipeline. More...

#include <peak_common/pipeline/peak_common_pipeline_base.hpp>

Inheritance diagram for peak::pipeline::PipelineBase:
peak::pipeline::IPipeline

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_NO_DISCARD peak::common::Any operator<< (const peak::common::Any &input) override
 Convenience operator for processing input using the pipeline.
PEAK_COMMON_NO_DISCARD peak::common::Any Process (const peak::common::Any &input) const override
 Processes the input through all pipeline modules and returns the result.
Public Member Functions inherited from peak::pipeline::IPipeline
virtual ~IPipeline ()=default
virtual PEAK_COMMON_NO_DISCARD 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 PEAK_COMMON_NO_DISCARD const char * GetType () const =0
 Returns the type identifier of the pipeline.

Additional Inherited Members

Protected Member Functions inherited from peak::pipeline::IPipeline
virtual PEAK_COMMON_NO_DISCARD std::vector< std::shared_ptr< modules::IModule > > GetModules () const =0
 Retrieves the list of all modules in the pipeline, in execution order.

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

Member Function Documentation

◆ ExportSettingsToFile()

void peak::pipeline::PipelineBase::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 peak::pipeline::IPipeline.

◆ ImportSettingsFromFile()

void peak::pipeline::PipelineBase::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 peak::pipeline::IPipeline.

◆ operator<<()

peak::common::Any peak::pipeline::PipelineBase::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 peak::pipeline::IPipeline.

◆ Process()

peak::common::Any peak::pipeline::PipelineBase::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 peak::pipeline::IPipeline.


The documentation for this class was generated from the following file: