Skip to navigation

holoscan::config::ConfigCodec< std::map< std::string, T, Compare, Allocator > >

Beta
View as MarkdownOpen in Claude
template <ConfigCodable T, class Compare, class Allocator>

Provide the built-in string-keyed ordered-map codec.

Only std::less<std::string> and transparent std::less<> comparators are admitted so encoded object behavior does not depend on an application-defined comparator.

#include <holoscan/config/codec.hpp>

Template parameters

T
ConfigCodable

Owning mapped type satisfying ConfigCodable.

Compare
class

Admitted standard lexicographic comparator.

Allocator
class

Map allocator retained by the decoded result.


Static methods

decode

static ConfigResult<Map> holoscan::config::ConfigCodec<std::map<std::string, T, Compare, Allocator>>::decode(
ConfigView view,
const DecodeOptions &options,
DecodeContext &context
)

Decode each unique object entry into the resulting ordered map.

Returns: The owning ordered map or a structured type/budget/child failure.

Parameters

view
ConfigView

Semantic object to decode.

options
const DecodeOptions &

Typed mapped-value conversion policy.

context
DecodeContext &

Borrowed monotonic decode context.

encode

static ConfigResult<ConfigValue> holoscan::config::ConfigCodec<std::map<std::string, T, Compare, Allocator>>::encode(
const Map &values,
const EncodeOptions &options,
EncodeContext &context
)

Encode map entries as an object under shared monotonic budgets.

Returns: The immutable semantic object or a structured UTF-8/budget/child failure.

Parameters

values
const Map &

String-keyed values to encode.

options
const EncodeOptions &

Typed mapped-value encoding policy.

context
EncodeContext &

Borrowed monotonic encode context.


Types

Typedefs

NameDefinitionDescription
Mapstd::map< std::string, T, Compare, Allocator >Owning decoded map type.