|
Porytiles
|
Abstract base class for operations in a processing pipeline. More...
#include <operation.hpp>
Public Member Functions | |
| virtual | ~Operation ()=default |
| virtual std::vector< OperandDeclaration > | declare_inputs () const =0 |
| Declares the input operands required by this operation. | |
| virtual std::vector< OperandDeclaration > | declare_outputs () const =0 |
| Declares the output operands produced by this operation. | |
| virtual ChainableResult< OperandBundle > | apply (const OperandBundle &inputs) |
| Applies this operation to the given input operands. | |
| const std::string & | name () const |
| Gets the name of this operation. | |
| void | set_name (const std::string &name) |
| Sets the name of this operation. | |
Protected Member Functions | |
| virtual ChainableResult< OperandBundle > | execute (const OperandBundle &inputs)=0 |
| Executes the operation's processing logic. | |
Abstract base class for operations in a processing pipeline.
Operation represents a single processing unit in a pipeline that takes input operands and produces output operands. Each operation must declare its expected inputs and outputs, and implement the execute method to perform its specific processing logic. The apply method validates inputs against declared requirements before execution.
Definition at line 22 of file operation.hpp.
|
virtualdefault |
|
inlinevirtual |
Applies this operation to the given input operands.
Validates that the provided inputs satisfy the declared input requirements before delegating to the execute method. Panics if inputs are invalid.
| inputs | Bundle of input operands to process |
Definition at line 50 of file operation.hpp.
|
pure virtual |
Declares the input operands required by this operation.
|
pure virtual |
Declares the output operands produced by this operation.
|
protectedpure virtual |
Executes the operation's processing logic.
Subclasses must implement this method to define their specific processing behavior. This method is called by apply after input validation has passed.
| inputs | Validated bundle of input operands |
|
inline |
Gets the name of this operation.
Definition at line 64 of file operation.hpp.
|
inline |
Sets the name of this operation.
| name | The new name for this operation |
Definition at line 74 of file operation.hpp.