Skip to navigation

holoscan::config::ConfigCodec< std::array< T, N > >

Beta
View as Markdown
template <ConfigCodable T, std::size_t N>

Provide the built-in exact-cardinality array codec for std::array.

#include <holoscan/config/codec.hpp>

Template parameters

T
ConfigCodable

Owning element type satisfying ConfigCodable.

N
std::size_t

Required semantic array cardinality.


Static methods

decode

static ConfigResult<std::array<T, N>> holoscan::config::ConfigCodec<std::array<T, N>>::decode(
ConfigView view,
const DecodeOptions &options,
DecodeContext &context
)

Decode exactly N elements and reject every other cardinality.

Returns: The exact-cardinality array or a structured type/budget/child failure.

Parameters

view
ConfigView

Semantic array to decode.

options
const DecodeOptions &

Typed element conversion policy.

context
DecodeContext &

Borrowed monotonic decode context.

encode

static ConfigResult<ConfigValue> holoscan::config::ConfigCodec<std::array<T, N>>::encode(
const std::array<T, N> &values,
const EncodeOptions &options,
EncodeContext &context
)

Encode all N elements in index order.

Returns: The immutable semantic array or a structured budget/child failure.

Parameters

values
const std::array<T, N> &

Ordered elements to encode.

options
const EncodeOptions &

Typed element encoding policy.

context
EncodeContext &

Borrowed monotonic encode context.