holoscan::config::Path
holoscan::config::Path
Own an RFC 6901 JSON Pointer path.
Paths copy and validate every token. They are independent of the source text and safe for concurrent reads after construction.
Methods
token_count
Return the number of decoded tokens.
token
Borrow one decoded token.
Returns: The token, or an empty view when index is out of range.
Parameters
Zero-based token index.
to_string
Render the path with RFC 6901 escaping.
Returns: Newly allocated pointer text; the root renders as an empty string.
is_root
Return whether this path addresses the document root.
Static methods
parse
Parse and own an RFC 6901 JSON Pointer.
Returns: The owned path.
Throws: ConfigException with CONFIG_PATH_SYNTAX, CONFIG_INVALID_UTF8, or CONFIG_LIMIT_EXCEEDED on failure.
Parameters
Empty root text or slash-prefixed UTF-8 pointer text.
See also: try_parse
try_parse
Try to parse and own an RFC 6901 JSON Pointer.
Returns: The owned path or CONFIG_PATH_SYNTAX/CONFIG_INVALID_UTF8/ CONFIG_LIMIT_EXCEEDED.
Parameters
Empty root text or slash-prefixed UTF-8 pointer text.
See also: parse
root
Create the empty root path without allocating.