diff options
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/util.h b/src/util.h index 3ec38a7c7d..f030dbbb26 100644 --- a/src/util.h +++ b/src/util.h @@ -41,8 +41,7 @@ public: boost::signals2::signal<std::string (const char* psz)> Translate; }; -extern std::map<std::string, std::string> mapArgs; -extern std::map<std::string, std::vector<std::string> > mapMultiArgs; +extern const std::map<std::string, std::vector<std::string> >& mapMultiArgs; extern bool fDebug; extern bool fPrintToConsole; extern bool fPrintToDebugLog; @@ -106,7 +105,7 @@ boost::filesystem::path GetConfigFile(const std::string& confPath); boost::filesystem::path GetPidFile(); void CreatePidFile(const boost::filesystem::path &path, pid_t pid); #endif -void ReadConfigFile(const std::string& confPath, std::map<std::string, std::string>& mapSettingsRet, std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet); +void ReadConfigFile(const std::string& confPath); #ifdef WIN32 boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate = true); #endif @@ -124,6 +123,14 @@ inline bool IsSwitchChar(char c) } /** + * Return true if the given argument has been manually set + * + * @param strArg Argument to get (e.g. "-foo") + * @return true if the argument has been set + */ +bool IsArgSet(const std::string& strArg); + +/** * Return string argument or default value * * @param strArg Argument to get (e.g. "-foo") @@ -168,6 +175,9 @@ bool SoftSetArg(const std::string& strArg, const std::string& strValue); */ bool SoftSetBoolArg(const std::string& strArg, bool fValue); +// Forces a arg setting, used only in testing +void ForceSetArg(const std::string& strArg, const std::string& strValue); + /** * Format a string to be used as group of options in help messages * |