![]() |
Bitcoin Core
31.0.0
P2P Digital Currency
|
#include <common/settings.h>#include <compat/compat.h>#include <sync.h>#include <util/chaintype.h>#include <util/fs.h>#include <concepts>#include <cstdint>#include <iosfwd>#include <list>#include <map>#include <optional>#include <set>#include <string>#include <variant>#include <vector>Go to the source code of this file.
Classes | |
| struct | KeyInfo |
| struct | SectionInfo |
| class | ArgsManager |
| struct | ArgsManager::Arg |
| struct | ArgsManager::Command |
Functions | |
| bool | CheckDataDirOption (const ArgsManager &args) |
| fs::path | AbsPathForConfigVal (const ArgsManager &args, const fs::path &path, bool net_specific=true) |
| Most paths passed as configuration arguments are treated as relative to the datadir if they are not absolute. More... | |
| bool | IsSwitchChar (char c) |
| KeyInfo | InterpretKey (std::string key) |
| Parse "name", "section.name", "noname", "section.noname" settings keys. More... | |
| std::optional< common::SettingsValue > | InterpretValue (const KeyInfo &key, const std::string *value, unsigned int flags, std::string &error) |
| Interpret settings value based on registered flags. More... | |
| std::string | SettingToString (const common::SettingsValue &, const std::string &) |
| std::optional< std::string > | SettingToString (const common::SettingsValue &) |
| template<std::integral Int> | |
| Int | SettingTo (const common::SettingsValue &, Int) |
| template<std::integral Int> | |
| std::optional< Int > | SettingTo (const common::SettingsValue &) |
| bool | SettingToBool (const common::SettingsValue &, bool) |
| std::optional< bool > | SettingToBool (const common::SettingsValue &) |
| bool | HelpRequested (const ArgsManager &args) |
| void | SetupHelpOptions (ArgsManager &args) |
| Add help options to the args manager. More... | |
| bool | HasTestOption (const ArgsManager &args, const std::string &test_option) |
| Checks if a particular test option is present in -test command-line arg options. More... | |
| std::string | HelpMessageGroup (const std::string &message) |
| Format a string to be used as group of options in help messages. More... | |
| std::string | HelpMessageOpt (const std::string &option, const std::string &message) |
| Format a string to be used as option description in help messages. More... | |
Variables | |
| const char *const | BITCOIN_CONF_FILENAME |
| const char *const | BITCOIN_SETTINGS_FILENAME |
| ArgsManager | gArgs |
| const std::vector< std::string > | TEST_OPTIONS_DOC |
|
strong |
| fs::path AbsPathForConfigVal | ( | const ArgsManager & | args, |
| const fs::path & | path, | ||
| bool | net_specific = true |
||
| ) |
Most paths passed as configuration arguments are treated as relative to the datadir if they are not absolute.
| args | Parsed arguments and settings. |
| path | The path to be conditionally prefixed with datadir. |
| net_specific | Use network specific datadir variant |
Definition at line 226 of file config.cpp.
| bool CheckDataDirOption | ( | const ArgsManager & | args | ) |
| bool HasTestOption | ( | const ArgsManager & | args, |
| const std::string & | test_option | ||
| ) |
| std::string HelpMessageGroup | ( | const std::string & | message | ) |
| std::string HelpMessageOpt | ( | const std::string & | option, |
| const std::string & | message | ||
| ) |
Format a string to be used as option description in help messages.
| option | Option message (e.g. "-rpcuser=<user>") |
| message | Option description (e.g. "Username for JSON-RPC connections") |
Definition at line 736 of file args.cpp.
| bool HelpRequested | ( | const ArgsManager & | args | ) |
| KeyInfo InterpretKey | ( | std::string | key | ) |
Parse "name", "section.name", "noname", "section.noname" settings keys.
Definition at line 77 of file args.cpp.
| std::optional<common::SettingsValue> InterpretValue | ( | const KeyInfo & | key, |
| const std::string * | value, | ||
| unsigned int | flags, | ||
| std::string & | error | ||
| ) |
Interpret settings value based on registered flags.
| [in] | key | key information to know if key was negated |
| [in] | value | string value of setting to be parsed |
| [in] | flags | ArgsManager registered argument flags |
| [out] | error | Error description if settings value is not valid |
Definition at line 105 of file args.cpp.
|
inline |
| Int SettingTo | ( | const common::SettingsValue & | , |
| Int | |||
| ) |
| std::optional<Int> SettingTo | ( | const common::SettingsValue & | ) |
| bool SettingToBool | ( | const common::SettingsValue & | , |
| bool | |||
| ) |
| std::optional<bool> SettingToBool | ( | const common::SettingsValue & | ) |
| std::string SettingToString | ( | const common::SettingsValue & | , |
| const std::string & | |||
| ) |
| std::optional<std::string> SettingToString | ( | const common::SettingsValue & | ) |
| void SetupHelpOptions | ( | ArgsManager & | args | ) |
| ArgsManager gArgs |
1.8.14