Skip to navigation

holoscan::authoring::ForeignSchemaValue

Beta
View as Markdown

Carry one generated-schema value across a language-binding boundary.

Objects retain canonical generated field names, sequences retain element order, and null represents an absent optional field. This is an authoring-adapter representation only; Runtime continues to carry the exact registered C++ payload and use its generated schema codec.

#include <holoscan/authoring/registry.hpp>

Constructors

ForeignSchemaValue

holoscan::authoring::ForeignSchemaValue::ForeignSchemaValue() = default

Create an absent optional field.


Methods

is_null

bool holoscan::authoring::ForeignSchemaValue::is_null() const noexcept

Return whether this value represents an absent optional field.

get

template <typename T>
const T * holoscan::authoring::ForeignSchemaValue::get() const noexcept

Borrow the exact stored alternative, or null for a different kind.

field

const ForeignSchemaValue * holoscan::authoring::ForeignSchemaValue::field(
std::string_view name
) const noexcept

Find one canonical object field, ignoring unknown fields at native conversion.


Static methods

boolean

static ForeignSchemaValue holoscan::authoring::ForeignSchemaValue::boolean(
bool value
)

Create an exact Boolean field.

signed_integer

static ForeignSchemaValue holoscan::authoring::ForeignSchemaValue::signed_integer(
std::int64_t value
)

Create an exact signed-integer field.

unsigned_integer

static ForeignSchemaValue holoscan::authoring::ForeignSchemaValue::unsigned_integer(
std::uint64_t value
)

Create an exact unsigned-integer field.

floating_point

static ForeignSchemaValue holoscan::authoring::ForeignSchemaValue::floating_point(
double value
)

Create a floating-point field represented at binding precision.

string

static ForeignSchemaValue holoscan::authoring::ForeignSchemaValue::string(
std::string value
)

Create an owning string field.

tensor

static ForeignSchemaValue holoscan::authoring::ForeignSchemaValue::tensor(
Tensor value
)

Create an owning Tensor field handle.

sequence

static ForeignSchemaValue holoscan::authoring::ForeignSchemaValue::sequence(
Sequence value
)

Create an ordered sequence field.

numeric_sequence

static ForeignSchemaValue holoscan::authoring::ForeignSchemaValue::numeric_sequence(
NumericSequence value
)

Create an owning numeric vector, preserving its native element type.

object

static ForeignSchemaValue holoscan::authoring::ForeignSchemaValue::object(
Object value
)

Create a canonical generated object.


Types

Typedefs

NameDefinitionDescription
Sequencestd::vector< ForeignSchemaValue >Ordered field sequence.
Objectstd::map< std::string, ForeignSchemaValue, std::less<> >Canonical named fields.
NumericSequencestd::variant< std::vector< std::int8_t >, std::vector< std::uint8_t >, std::vector< std::int16_t >, std::vector< std::uint16_t >, std::vector< std::int32_t >, std::vector< std::uint32_t >, std::vector< std::int64_t >, std::vector< std::uint64_t >, std::vector< float >, std::vector< double > >Contiguous, owning numeric vectors without one tagged value per element.
Storagestd::variant< std::monostate, bool, std::int64_t, std::uint64_t, double, std::string, Tensor, Sequence, Object, NumericSequence >

Member variables

NameTypeDescription
storage_Storage