|
| | TestArgsManager () |
| |
| void | ReadConfigString (const std::string str_config) |
| |
| void | SetNetworkOnlyArg (const std::string arg) |
| |
| void | SetupArgs (const std::vector< std::pair< std::string, unsigned int > > &args) |
| |
| util::SettingsValue | GetSetting (const std::string &arg) const |
| | Get setting value. More...
|
| |
| std::vector< util::SettingsValue > | GetSettingsList (const std::string &arg) const |
| | Get list of setting values. More...
|
| |
| bool | ReadConfigStream (std::istream &stream, const std::string &filepath, std::string &error, bool ignore_invalid_keys=false) |
| |
| util::SettingsValue | GetSetting (const std::string &arg) const |
| | Get setting value. More...
|
| |
| std::vector< util::SettingsValue > | GetSettingsList (const std::string &arg) const |
| | Get list of setting values. More...
|
| |
| | ArgsManager () |
| |
| | ~ArgsManager () |
| |
| void | SelectConfigNetwork (const std::string &network) |
| | Select the network in use. More...
|
| |
| bool | ParseParameters (int argc, const char *const argv[], std::string &error) |
| |
| bool | ReadConfigFiles (std::string &error, bool ignore_invalid_keys=false) |
| |
| const std::set< std::string > | GetUnsuitableSectionOnlyArgs () const |
| | Log warnings for options in m_section_only_args when they are specified in the default section but not overridden on the command line or in a network-specific section in the config file. More...
|
| |
| const std::list< SectionInfo > | GetUnrecognizedSections () const |
| | Log warnings for unrecognized section names in the config file. More...
|
| |
| std::optional< const Command > | GetCommand () const |
| | Get the command and command args (returns std::nullopt if no command provided) More...
|
| |
| const fs::path & | GetBlocksDirPath () const |
| | Get blocks directory path. More...
|
| |
| const fs::path & | GetDataDirBase () const |
| | Get data directory path. More...
|
| |
| const fs::path & | GetDataDirNet () const |
| | Get data directory path with appended network identifier. More...
|
| |
| void | ClearPathCache () |
| | Clear cached directory paths. More...
|
| |
| std::vector< std::string > | GetArgs (const std::string &strArg) const |
| | Return a vector of strings of the given argument. More...
|
| |
| bool | IsArgSet (const std::string &strArg) const |
| | Return true if the given argument has been manually set. More...
|
| |
| bool | IsArgNegated (const std::string &strArg) const |
| | Return true if the argument was originally passed as a negated option, i.e. More...
|
| |
| std::string | GetArg (const std::string &strArg, const std::string &strDefault) const |
| | Return string argument or default value. More...
|
| |
| int64_t | GetIntArg (const std::string &strArg, int64_t nDefault) const |
| | Return integer argument or default value. More...
|
| |
| bool | GetBoolArg (const std::string &strArg, bool fDefault) const |
| | Return boolean argument or default value. More...
|
| |
| bool | SoftSetArg (const std::string &strArg, const std::string &strValue) |
| | Set an argument if it doesn't already have a value. More...
|
| |
| bool | SoftSetBoolArg (const std::string &strArg, bool fValue) |
| | Set a boolean argument if it doesn't already have a value. More...
|
| |
| void | ForceSetArg (const std::string &strArg, const std::string &strValue) |
| |
| std::string | GetChainName () const |
| | Returns the appropriate chain name from the program arguments. More...
|
| |
| void | AddArg (const std::string &name, const std::string &help, unsigned int flags, const OptionsCategory &cat) |
| | Add argument. More...
|
| |
| void | AddCommand (const std::string &cmd, const std::string &help) |
| | Add subcommand. More...
|
| |
| void | AddHiddenArgs (const std::vector< std::string > &args) |
| | Add many hidden arguments. More...
|
| |
| void | ClearArgs () |
| | Clear available arguments. More...
|
| |
| std::string | GetHelpMessage () const |
| | Get the help string. More...
|
| |
| std::optional< unsigned int > | GetArgFlags (const std::string &name) const |
| | Return Flags for known arg. More...
|
| |
| bool | InitSettings (std::string &error) |
| | Read and update settings file with saved settings. More...
|
| |
| bool | GetSettingsPath (fs::path *filepath=nullptr, bool temp=false) const |
| | Get settings file path, or return false if read-write settings were disabled with -nosettings. More...
|
| |
| bool | ReadSettingsFile (std::vector< std::string > *errors=nullptr) |
| | Read settings file. More...
|
| |
| bool | WriteSettingsFile (std::vector< std::string > *errors=nullptr) const |
| | Write settings file. More...
|
| |
| template<typename Fn > |
| void | LockSettings (Fn &&fn) |
| | Access settings with lock held. More...
|
| |
| void | LogArgs () const |
| | Log the config file options and the command line arguments, useful for troubleshooting. More...
|
| |
|
| enum | Flags : uint32_t {
ALLOW_ANY = 0x01
, DISALLOW_NEGATION = 0x20
, DEBUG_ONLY = 0x100
, NETWORK_ONLY = 0x200
,
SENSITIVE = 0x400
, COMMAND = 0x800
} |
| | Flags controlling how config and command line arguments are validated and interpreted. More...
|
| |
| util::Settings m_settings | GUARDED_BY (cs_args) |
| |
| std::vector< std::string > m_command | GUARDED_BY (cs_args) |
| |
| std::string m_network | GUARDED_BY (cs_args) |
| |
| std::set< std::string > m_network_only_args | GUARDED_BY (cs_args) |
| |
| std::map< OptionsCategory, std::map< std::string, Arg > > m_available_args | GUARDED_BY (cs_args) |
| |
| bool m_accept_any_command | GUARDED_BY (cs_args) |
| |
| std::list< SectionInfo > m_config_sections | GUARDED_BY (cs_args) |
| |
| fs::path m_cached_blocks_path | GUARDED_BY (cs_args) |
| |
| fs::path m_cached_datadir_path | GUARDED_BY (cs_args) |
| |
| fs::path m_cached_network_datadir_path | GUARDED_BY (cs_args) |
| |
| bool | ReadConfigStream (std::istream &stream, const std::string &filepath, std::string &error, bool ignore_invalid_keys=false) |
| |
| bool | UseDefaultSection (const std::string &arg) const EXCLUSIVE_LOCKS_REQUIRED(cs_args) |
| | Returns true if settings values from the default section should be used, depending on the current network and whether the setting is network-specific. More...
|
| |
| RecursiveMutex | cs_args |
| |
Definition at line 210 of file util_tests.cpp.