Skip to navigation

holoscan::authoring::OpaqueOperatorRef

Beta
View as Markdown

Type-erase one exact typed Operator authoring handle.

Only the thunk table emitted for the exact Operator type can reconstruct its typed handle from stable Graph identity. The reference retains the Graph weakly so lifecycle thunks can connect distinct registered Operator types without extending the Graph lifetime.

#include <holoscan/authoring/registry.hpp>

Constructors

OpaqueOperatorRef

holoscan::authoring::OpaqueOperatorRef::OpaqueOperatorRef() = default

Create an empty invalid reference.


Methods

graph_valid

bool holoscan::authoring::OpaqueOperatorRef::graph_valid() const noexcept

Return whether the exact Graph declaration remains live.

Returns: true only while the Graph owns the registered Operator.

name

std::string_view holoscan::authoring::OpaqueOperatorRef::name() const noexcept

Return the Operator’s owned local declaration name.

Returns: Empty view after Graph retirement.

path

std::string holoscan::authoring::OpaqueOperatorRef::path() const

Return the canonical percent-encoded Graph/Operator lookup path.

Returns: Owned path using the no-leading-slash OperatorPath grammar.

Throws: RuntimeError when the Graph declaration is no longer live.

execution_partition

ExecutionPartitionView holoscan::authoring::OpaqueOperatorRef::execution_partition(
const ExecutionPartitionsView &partitions
) const

Return the accepted partition containing this exact root-Graph Operator.

Returns: Independently retained partition view.

Throws: RuntimeError with the native typed code for an unusable, foreign, stale, or unknown identity.

Parameters

partitions
const ExecutionPartitionsView &

Partition authority retained by one accepted execution plan.

port

OpaquePortRef holoscan::authoring::OpaqueOperatorRef::port(
std::string_view name
) const

Resolve one current local port without knowing the exact Operator type.

Returns: Logical reference that preserves the owning Operator’s exact type token.

Throws: RuntimeError when the reference is stale or the port is unknown.

Parameters

name
std::string_view

Exact setup-declared local port name.

ports

std::vector<PortRecord> holoscan::authoring::OpaqueOperatorRef::ports() const

Copy current setup-order port records without knowing the exact Operator type.

Throws: RuntimeError when the reference is stale.

operator bool

holoscan::authoring::OpaqueOperatorRef::operator bool() const noexcept

Return whether this reference contains a registered declaration.

Returns: The same result as graph_valid.

holds_type

template <std::derived_from< OperatorBase > Op>
bool holoscan::authoring::OpaqueOperatorRef::holds_type() const noexcept

typed_handle

template <std::derived_from< OperatorBase > Op>
OperatorHandle<Op> holoscan::authoring::OpaqueOperatorRef::typed_handle() const noexcept

Static methods

region_add

static void holoscan::authoring::OpaqueOperatorRef::region_add(
RegionHandle &region,
std::span<const OpaqueOperatorRef> operators
)

Add an erased Operator batch to one region atomically.

Throws: RuntimeError under the matching RegionHandle::add contract.

Parameters

region
RegionHandle &

Destination region owned by the same live Graph.

operators
std::span<const OpaqueOperatorRef>

Non-empty registered Operator references.

region_add_members

static void holoscan::authoring::OpaqueOperatorRef::region_add_members(
RegionHandle &region,
std::span<const OpaqueOperatorRef> operators,
std::span<const OpaqueGraphRef> graphs
)

Add erased Operator and embedded-Graph members to one region atomically.

Throws: RuntimeError under the matching RegionHandle::add contract.

Parameters

region
RegionHandle &

Destination region owned by the same live Graph.

operators
std::span<const OpaqueOperatorRef>

Registered Operator references, which may be empty.

graphs
std::span<const OpaqueGraphRef>

Embedded-Graph references, which may be empty when operators are present.

partition_add

static void holoscan::authoring::OpaqueOperatorRef::partition_add(
PartitionHandle &partition,
std::span<const OpaqueOperatorRef> operators
)

Add an erased Operator batch to one partition atomically.

Throws: RuntimeError under the matching variadic PartitionHandle::add contract.

Parameters

partition
PartitionHandle &

Destination partition owned by the same live Graph.

operators
std::span<const OpaqueOperatorRef>

Non-empty registered Operator references.

lifecycle_before

static void holoscan::authoring::OpaqueOperatorRef::lifecycle_before(
const OpaqueOperatorRef &before,
const OpaqueOperatorRef &after,
)

Author one cross-type lifecycle dependency through resolved Graph identities.

lifecycle_allow_self_restart

static void holoscan::authoring::OpaqueOperatorRef::lifecycle_allow_self_restart(
const OpaqueOperatorRef &target
)

Authorize one erased Operator to request its own restart.

lifecycle_allow_external_restart

static void holoscan::authoring::OpaqueOperatorRef::lifecycle_allow_external_restart(
const OpaqueOperatorRef &target
)

Authorize external control to restart one erased Operator.

lifecycle_allow_restart_request

static void holoscan::authoring::OpaqueOperatorRef::lifecycle_allow_restart_request(
const OpaqueOperatorRef &requester,
const OpaqueOperatorRef &target
)

Authorize one erased requester to restart another erased Operator.

from_handle

template <std::derived_from< OperatorBase > Op>
static OpaqueOperatorRef holoscan::authoring::OpaqueOperatorRef::from_handle(
const OperatorHandle<Op> &handle
)

Type-erase one public typed Operator handle.


Member variables

NameTypeDescription
state_std::weak_ptr< holoscan::detail::GraphState >
index_std::size_t
handle_identity_std::shared_ptr< const void >
operator_type_token_const void *