holoscan::config::ObjectDecoder
holoscan::config::ObjectDecoder
Traverse an object while recording consumed members for strict finish validation.
Constructors
ObjectDecoder
Overload 1
Copy (deleted)
Begin consuming one object value through the package-owned decode context.
Call finish exactly once before returning a successful codec result.
Parameters
Object value to traverse. A non-object is reported by the first operation.
Immutable policy controlling unknown members and child conversion.
Borrowed context that must outlive this decoder.
Disable copying because the decoder owns consumption state and borrows a context.
Destructor
~ObjectDecoder
Destroy local consumption state without implicitly closing the context scope.
A codec that returns success without calling finish is rejected by try_decode_config.
Assignment operators
operator=
Disable copy assignment because the decoder owns consumption state.
Methods
required
Decode and mark one required object member as consumed.
Returns: The decoded value, CONFIG_PATH_NOT_FOUND, or a structured child failure.
Template parameters
Owning member type satisfying ConfigCodable.
Parameters
Exact unescaped UTF-8 object key.
optional
Decode and mark one optional object member as consumed when present.
Returns: Empty optional when absent, the decoded value when present, or a structured failure.
Template parameters
Owning member type satisfying ConfigCodable.
Parameters
Exact unescaped UTF-8 object key.
finish
Validate complete object consumption and close this decoder scope.
Calling finish again after success is idempotent.
Returns: Success, the construction failure, or CONFIG_CODEC_FAILURE for an unconsumed member under UnknownFieldPolicy::kReject.