IDS peak genericC++ v1.15.0
Loading...
Searching...
No Matches
peak::pipeline::modules::IModule Class Referenceabstract

Interface for a module used within a pipeline. More...

#include <peak_common/pipeline/modules/peak_common_imodule.hpp>

Inheritance diagram for peak::pipeline::modules::IModule:
peak::common::serialization::ISerializable peak::pipeline::modules::IAutoFeature peak::pipeline::modules::IGain

Public Member Functions

 ~IModule () override=default
virtual void SetEnabled (bool enabled)=0
 Sets the enabled state of the module.
virtual PEAK_COMMON_NO_DISCARD bool IsEnabled () const =0
 Checks whether the module is currently enabled.
virtual PEAK_COMMON_NO_DISCARD const char * GetType () const =0
 Returns the type identifier of the module.
virtual PEAK_COMMON_NO_DISCARD peak::common::Any Process (const peak::common::Any &input) const =0
 Processes input data and returns the result.
virtual void ResetToDefault ()=0
 Resets the module to its default state. The enabled state is not reset.
Public Member Functions inherited from peak::common::serialization::ISerializable
virtual ~ISerializable ()=default
virtual void Serialize (IArchive &archive) const =0
 Serializes the current object into the provided archive.
virtual void Deserialize (const IArchive &archive)=0
 Deserializes the object's state from the provided archive.

Detailed Description

Interface for a module used within a pipeline.

Defines the required functions that must be implemented by any module participating in the pipeline. Modules must support enabling/disabling, processing input, and serialization.

Since
ids_peak_common 1.0

Constructor & Destructor Documentation

◆ ~IModule()

peak::pipeline::modules::IModule::~IModule ( )
overridedefault

Member Function Documentation

◆ GetType()

virtual PEAK_COMMON_NO_DISCARD const char * peak::pipeline::modules::IModule::GetType ( ) const
pure virtual

Returns the type identifier of the module.

This should be a unique string identifying the specific implementation of the module.

Returns
A null-terminated string identifying the module type.
Since
ids_peak_common 1.0

◆ IsEnabled()

virtual PEAK_COMMON_NO_DISCARD bool peak::pipeline::modules::IModule::IsEnabled ( ) const
pure virtual

Checks whether the module is currently enabled.

Returns
True if the module is enabled, false otherwise.
Since
ids_peak_common 1.0

◆ Process()

virtual PEAK_COMMON_NO_DISCARD peak::common::Any peak::pipeline::modules::IModule::Process ( const peak::common::Any & input) const
pure virtual

Processes input data and returns the result.

This function is called by the pipeline to process a unit of data.

Parameters
inputThe input data to be processed.
Returns
The processed input.
Since
ids_peak_common 1.0

◆ ResetToDefault()

virtual void peak::pipeline::modules::IModule::ResetToDefault ( )
pure virtual

Resets the module to its default state. The enabled state is not reset.

Since
ids_peak_common 1.0

◆ SetEnabled()

virtual void peak::pipeline::modules::IModule::SetEnabled ( bool enabled)
pure virtual

Sets the enabled state of the module.

Parameters
enabledTrue to enable the module, false to disable it.
Since
ids_peak_common 1.0

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