|
Uni20
Asynchronous tensor and runtime library.
|
Collect CLI input first, then resolve declared fallback sources after loading input attributes. More...
#include <configuration.hpp>
Public Member Functions | |
| template<ConfigurationValue T> requires (!presentation::data_table_detail::optional_traits<T>::optional) | |
| configuration_binding & | bind (CLI::Option *option, T &target, std::string id) |
| Bind a declared CLI11 option to a stable metadata id, capturing its initialized value as default. | |
| configuration (CLI::App &app, uni20::configuration::environment_reader environment=[](std::string const &name) -> std::optional< std::string > { if(auto p=std::getenv(name.c_str())) return std::string(p);return std::nullopt;}) | |
| configuration (configuration const &)=delete | |
| void | load_option_file () |
| Read the explicitly requested file using CLI11's configured TOML/INI reader. | |
| configuration & | operator= (configuration const &)=delete |
| CLI::Option * | option_file (std::string names="--config") |
| Register an explicit option-file path; help never opens the file. | |
| parse_result | parse (int argc, char const *const *argv, parse_policy policy={}) |
| metadata_document | resolve () const |
| Resolve all bindings, assigning native CLI variables and returning owned metadata. | |
| presentation::report_builder | result_report (presentation::program_info const &program, parse_result const &result) const |
| Include declared fallback sources in help, without evaluating or opening them. | |
| uni20::configuration & | values () |
Collect CLI input first, then resolve declared fallback sources after loading input attributes.
The app, options and bound variables must outlive this adapter. It is single-use and supports scalar options/boolean flags, not subcommands or CLI11 needs/excludes constraints on bound options. Declare cross-field checks after resolve(). Ordinary unbound CLI11 options keep their semantics.
|
inlineexplicit |
|
delete |
|
inline |
Bind a declared CLI11 option to a stable metadata id, capturing its initialized value as default.
Conversion and validators remain on the original CLI11 option. Fallback values cross that textual boundary using native round-trip formatting, including exact half-integers.
|
inline |
Read the explicitly requested file using CLI11's configured TOML/INI reader.
Call after handling information actions and before bootstrap/input resolution.
|
delete |
|
inline |
Register an explicit option-file path; help never opens the file.
|
inline |
|
inline |
Resolve all bindings, assigning native CLI variables and returning owned metadata.
|
inline |
Include declared fallback sources in help, without evaluating or opening them.
|
inline |