33 const std::initializer_list<std::string_view> confPath)
const
36 for (
auto part : confPath) {
44 std::optional<std::vector<std::string>>
listOption(
45 const std::initializer_list<std::string_view> confPath)
const;
47 const char *
const envVariable,
48 const std::initializer_list<std::string_view> confPath)
const;
50 const char *
const envVariable,
51 const std::initializer_list<std::string_view> confPath,
52 const std::string delimiter =
":")
const;
55 bool loadFile(
const std::filesystem::path &fileName);
58 std::unique_ptr<YamlObject> yamlConfiguration_ =
59 std::make_unique<YamlObject>();
Support for global libcamera configuration.
Definition global_configuration.h:22
std::optional< std::vector< std::string > > envListOption(const char *const envVariable, const std::initializer_list< std::string_view > confPath, const std::string delimiter=":") const
Retrieve the value of the configuration option from a file or environment.
Definition global_configuration.cpp:206
GlobalConfiguration()
Initialize the global configuration.
Definition global_configuration.cpp:117
unsigned int version() const
Retrieve the configuration version.
Definition global_configuration.cpp:229
std::optional< std::vector< std::string > > listOption(const std::initializer_list< std::string_view > confPath) const
Retrieve the value of configuration option confPath.
Definition global_configuration.cpp:146
std::optional< T > option(const std::initializer_list< std::string_view > confPath) const
Retrieve the value of configuration option confPath.
Definition global_configuration.h:32
Configuration configuration() const
Retrieve the libcamera global configuration.
Definition global_configuration.cpp:248
std::optional< std::string > envOption(const char *const envVariable, const std::initializer_list< std::string_view > confPath) const
Retrieve the value of environment variable with a fallback on the configuration file.
Definition global_configuration.cpp:177
A class representing the tree structure of the YAML content.
Definition yaml_parser.h:28
std::optional< T > get() const
Parse the YamlObject as a T value.
Definition yaml_parser.h:175
Top-level libcamera namespace.
Definition backtrace.h:17
Miscellaneous utility functions.