#include <common/settings.h>
#include <compat/compat.h>
#include <sync.h>
#include <util/chaintype.h>
#include <util/fs.h>
#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.
|
| enum class | OptionsCategory {
OPTIONS
, CONNECTION
, WALLET
, WALLET_DEBUG_TEST
,
ZMQ
, DEBUG_TEST
, CHAINPARAMS
, NODE_RELAY
,
BLOCK_CREATION
, RPC
, GUI
, COMMANDS
,
REGISTER_COMMANDS
, CLI_COMMANDS
, IPC
, HIDDEN
} |
| |
|
| 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 &) |
| |
| int64_t | SettingToInt (const common::SettingsValue &, int64_t) |
| |
| std::optional< int64_t > | SettingToInt (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...
|
| |
◆ OptionsCategory
| Enumerator |
|---|
| OPTIONS | |
| CONNECTION | |
| WALLET | |
| WALLET_DEBUG_TEST | |
| ZMQ | |
| DEBUG_TEST | |
| CHAINPARAMS | |
| NODE_RELAY | |
| BLOCK_CREATION | |
| RPC | |
| GUI | |
| COMMANDS | |
| REGISTER_COMMANDS | |
| CLI_COMMANDS | |
| IPC | |
| HIDDEN | |
Definition at line 52 of file args.h.
◆ AbsPathForConfigVal()
Most paths passed as configuration arguments are treated as relative to the datadir if they are not absolute.
- Parameters
-
| args | Parsed arguments and settings. |
| path | The path to be conditionally prefixed with datadir. |
| net_specific | Use network specific datadir variant |
- Returns
- The normalized path.
Definition at line 226 of file config.cpp.
◆ CheckDataDirOption()
◆ HasTestOption()
| bool HasTestOption |
( |
const ArgsManager & |
args, |
|
|
const std::string & |
test_option |
|
) |
| |
Checks if a particular test option is present in -test command-line arg options.
Definition at line 728 of file args.cpp.
◆ HelpMessageGroup()
| std::string HelpMessageGroup |
( |
const std::string & |
message | ) |
|
Format a string to be used as group of options in help messages.
- Parameters
-
| message | Group name (e.g. "RPC server options:") |
- Returns
- the formatted string
Definition at line 711 of file args.cpp.
◆ HelpMessageOpt()
| std::string HelpMessageOpt |
( |
const std::string & |
option, |
|
|
const std::string & |
message |
|
) |
| |
Format a string to be used as option description in help messages.
- Parameters
-
| option | Option message (e.g. "-rpcuser=<user>") |
| message | Option description (e.g. "Username for JSON-RPC connections") |
- Returns
- the formatted string
Definition at line 715 of file args.cpp.
◆ HelpRequested()
- Returns
- true if help has been requested via a command-line arg
Definition at line 696 of file args.cpp.
◆ InterpretKey()
| KeyInfo InterpretKey |
( |
std::string |
key | ) |
|
Parse "name", "section.name", "noname", "section.noname" settings keys.
- Note
- Where an option was negated can be later checked using the IsArgNegated() method. One use case for this is to have a way to disable options that are not normally boolean (e.g. using -nodebuglogfile to request that debug log output is not sent to any file at all).
Definition at line 77 of file args.cpp.
◆ InterpretValue()
| 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.
- Parameters
-
| [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 |
- Returns
- parsed settings value if it is valid, otherwise nullopt accompanied by a descriptive error string
Definition at line 105 of file args.cpp.
◆ IsSwitchChar()
| bool IsSwitchChar |
( |
char |
c | ) |
|
|
inline |
◆ SettingToBool() [1/2]
◆ SettingToBool() [2/2]
◆ SettingToInt() [1/2]
◆ SettingToInt() [2/2]
◆ SettingToString() [1/2]
◆ SettingToString() [2/2]
◆ SetupHelpOptions()
Add help options to the args manager.
Definition at line 701 of file args.cpp.
◆ BITCOIN_CONF_FILENAME
| const char* const BITCOIN_CONF_FILENAME |
|
extern |
◆ BITCOIN_SETTINGS_FILENAME
| const char* const BITCOIN_SETTINGS_FILENAME |
|
extern |
◆ gArgs
◆ TEST_OPTIONS_DOC
| const std::vector<std::string> TEST_OPTIONS_DOC |
|
extern |