holoscan::config::DecodeContext
holoscan::config::DecodeContext
Carry package-owned monotonic state for one decode call tree.
Applications receive this non-copyable object only inside ConfigCodec callbacks. A context and its children borrow top-level call state and must not escape the callback. It is not thread-safe; one top-level decode owns one independent context tree.
Constructors
DecodeContext
Overload 2
Copy (deleted)
Assignment operators
operator=
Disable copy assignment because the context borrows one call’s budget state.
Methods
path
Return the owned RFC 6901 path for the value currently being decoded.
decode_child
Decode one nested value while preserving path and monotonic call budgets.
Returns: The owning decoded child or its structured failure.
Template parameters
Nested owning type with a visible complete codec specialization.
Parameters
Unescaped object key or decimal array index for the child.
Borrowed child semantic value.
Immutable policy shared by the top-level invocation.
charge_allocation
Charge an owning result allocation against this call tree before allocating it.
Returns: Success or CONFIG_LIMIT_EXCEEDED without changing the budget on failure.
Parameters
Number of bytes the codec is about to allocate.
charge_string
Validate one string and charge its owning result bytes before allocating it.
Returns: Success or CONFIG_LIMIT_EXCEEDED.
Parameters
Decoded UTF-8 bytes the codec is about to own.
charge_container
Validate one container and charge its element storage before allocating it.
Returns: Success or CONFIG_LIMIT_EXCEEDED, including multiplication overflow.
Parameters
Number of immediate elements.
Owning storage bytes charged per element.