|
| AbstractConfig (StringMap initials={}) |
|
|
StringMap | unknownSettings |
|
◆ applyConfig()
void nix::AbstractConfig::applyConfig |
( |
const std::string & | contents, |
|
|
const std::string & | path = "<unknown>" ) |
Parses the configuration in contents
and applies it
- contents: configuration contents to be parsed and applied
- path: location of the configuration file
◆ convertToArgs()
virtual void nix::AbstractConfig::convertToArgs |
( |
Args & | args, |
|
|
const std::string & | category ) |
|
pure virtual |
Converts settings to Args
to be used on the command line interface
- args: args to write to
- category: category of the settings
Implemented in nix::Config, and nix::GlobalConfig.
◆ getSettings()
virtual void nix::AbstractConfig::getSettings |
( |
std::map< std::string, SettingInfo > & | res, |
|
|
bool | overriddenOnly = false ) |
|
pure virtual |
Adds the currently known settings to the given result map res
.
- res: map to store settings in
- overriddenOnly: when set to true only overridden settings will be added to
res
Implemented in nix::Config, and nix::GlobalConfig.
◆ reapplyUnknownSettings()
void nix::AbstractConfig::reapplyUnknownSettings |
( |
| ) |
|
Re-applies all previously attempted changes to unknown settings
◆ resetOverridden()
virtual void nix::AbstractConfig::resetOverridden |
( |
| ) |
|
|
pure virtual |
◆ set()
virtual bool nix::AbstractConfig::set |
( |
const std::string & | name, |
|
|
const std::string & | value ) |
|
pure virtual |
Sets the value referenced by name
to value
. Returns true if the setting is known, false otherwise.
Implemented in nix::Config, and nix::GlobalConfig.
◆ toJSON()
virtual nlohmann::json nix::AbstractConfig::toJSON |
( |
| ) |
|
|
pure virtual |
◆ toKeyValue()
virtual std::string nix::AbstractConfig::toKeyValue |
( |
| ) |
|
|
pure virtual |
◆ warnUnknownSettings()
void nix::AbstractConfig::warnUnknownSettings |
( |
| ) |
|
Logs a warning for each unregistered setting
The documentation for this class was generated from the following files:
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libutil/config.hh
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libutil/config.cc