Skip to navigation

holoscan::authoring::OperatorConstructionInputs

Beta
View as Markdown

Borrow the complete named inputs of one registered Operator construction call.

Views are valid only for the duration of the construction thunk. Thunks must copy any owner they keep, for example by capturing the std::shared_ptr returned by require_shared by value.

#include <holoscan/authoring/constructor_handle.hpp>

Methods

find

const ConstructorHandle * holoscan::authoring::OperatorConstructionInputs::find(
std::string_view name
) const noexcept

Return the handle supplied under name, or nullptr when it was omitted.

require_shared

template <typename T>
expected<std::shared_ptr<T>, Error> holoscan::authoring::OperatorConstructionInputs::require_shared(
std::string_view name,
const ConstructorHandleType<T> &type
) const

Recover the owner supplied under name.

Returns: The owner, or AUTHORING_CONSTRUCTOR_HANDLE_REQUIRED or a type-mismatch error.

Parameters

name
std::string_view

Canonical handle-input name.

type
const ConstructorHandleType<T> &

Typed descriptor binding expected for name.

callback

std::string_view name
) const

Return the callback supplied under name, or an empty function when it was omitted.

The returned function shares ownership of the supplied callback, so the caller may store and copy it freely; copies never duplicate the underlying callable.

Returns: The callback, an empty function, or a type-mismatch error.

Parameters

name
std::string_view

Canonical callback-input name declared with callback_handle_type.

optional_shared

template <typename T>
expected<std::shared_ptr<T>, Error> holoscan::authoring::OperatorConstructionInputs::optional_shared(
std::string_view name,
const ConstructorHandleType<T> &type
) const

Recover the owner supplied under name, or nullptr when it was omitted.

Returns: The owner or nullptr, or a type-mismatch error.

Parameters

name
std::string_view

Canonical optional handle-input name.

type
const ConstructorHandleType<T> &

Typed descriptor binding expected for name.


Member variables

NameTypeDescription
valuesstd::span< const ParameterAssignment >Ordinary named value assignments.
handlesstd::span< const ConstructorHandleAssignment >Validated named constructor handles.