holoscan::Config

Beta
View as Markdown

Class to get the configuration of the application.

#include <holoscan/config.hpp>

Constructors

Config

holoscan::Config::Config() = defaultholoscan::Config::Config() = default

Destructor

~Config

virtual holoscan::Config::~Config() = defaultvirtual holoscan::Config::~Config() = default

Assignment operators

operator=

Config & holoscan::Config::operator=(Config & holoscan::Config::operator=(
const Config &
) = delete

Methods

config_file

const std::string & holoscan::Config::config_file() const

Get the path to the configuration file.

Returns: The path to the configuration file.

prefix

const std::string & holoscan::Config::prefix() const

Get the prefix string that is prepended to the key of the configuration.

Returns: The prefix string that is prepended to the key of the configuration.

yaml_nodes

const std::vector<YAML::Node> & holoscan::Config::yaml_nodes() const

Get the YAML::Node objects that contains YAML document data.

Returns: The reference to the vector of YAML::Node objects.

from_config

ArgList holoscan::Config::from_config(ArgList holoscan::Config::from_config(
const std::string &key
)

Get the value of a configuration key as an ArgList.

This method retrieves the value from the configuration for the given key. You can use ’.’ (dot) to access nested fields.

Returns: The argument list of the configuration for the key.

Parameters

key
const std::string &

The key of the configuration.

config_keys

std::unordered_set<std::string> holoscan::Config::config_keys()

Determine the set of keys present in the config.

Returns all keys including nested keys using dot notation (e.g., “parent.child”).

Returns: The set of valid keys.

parse_file

void holoscan::Config::parse_file(
const std::string &config_file
)

Member variables

NameTypeDescription
config_file_std::string
prefix_std::string
yaml_nodes_std::vector< YAML::Node >