holoscan::OperatorBase
Define the non-templated lifecycle and compute extension points for an Operator.
An Operator is a stable noncopyable, nonmovable authoring object. setup() records cold metadata only. When all required runtime bindings are admitted, Runtime invokes an overridden start() whenever its kStart checkpoint is eligible during initial startup or a restart, invokes compute() for frozen activations, and invokes an overridden stop() whenever its kStop checkpoint is eligible during startup rollback, restart processing, or final teardown. Missing bindings fail before callbacks rather than selecting weaker lifecycle or scheduling semantics.
Constructors
OperatorBase
Default
Deleted overloads
Construct an unbound Operator authoring object.
Destructor
~OperatorBase
Destroy an Operator after its owning graph and run bindings have retired.
Assignment operators
operator=
Deleted overloads
The following overloads are deleted to prevent misuse:
Methods
setup
Declare stable ports and other cold metadata by reference.
Repeated calls receive fresh specs and must describe the same deterministic contract.
Parameters
Fresh declaration pass owned by the compiler or private conformance fixture.
contract
Return this Operator type’s complete cold temporal contract.
Runtime does not retain this authoring object’s address. Compilation calls this operation while replaying an owning Operator factory and freezes the validated descriptor into pointer-free plan records.
Returns: Fresh deep-owning descriptor; an empty value requests the inputful compile-time OnAnyInput default and is invalid for a zero-input Operator.
start
Enter steady-state execution after admitted startup barriers.
An override must remain public and keep the exact void start() signature. Graph authoring lowers it into the single required LifecycleStage::kStart checkpoint; an Operator cannot also register an advanced callback for that stage. Cold preparation belongs to explicit lifecycle stages added by their owning component. For a typed session-owned Operator, params() exposes the exact parameter generation selected for this phase.
stop
Leave steady-state execution before resource release.
An override must remain public and keep the exact void stop() signature. Graph authoring lowers it into the single required LifecycleStage::kStop checkpoint; an Operator cannot also register an advanced callback for that stage. For a typed session-owned Operator, params() exposes the exact parameter generation selected for this phase, including the restored old-published view during rollback.
compute
Process one frozen activation candidate.
The callback is invoked at most once for one activation tag. It must not wait for or recursively trigger another activation.
Returns: Success after Operator work completes, or a typed failure for Runtime policy.
Parameters
Borrowed callback-lifetime runtime services and activation evidence.
host_metadata
Return cold compiler-visible callback-host metadata.
Returns: Native hosting without a serialization constraint by default.