mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
[trivial] fix indentation for ArgsManager class
This commit is contained in:
parent
228c319a94
commit
7810993335
101
src/util.h
101
src/util.h
@ -187,62 +187,63 @@ public:
|
|||||||
void ParseParameters(int argc, const char*const argv[]);
|
void ParseParameters(int argc, const char*const argv[]);
|
||||||
void ReadConfigFile(const std::string& confPath);
|
void ReadConfigFile(const std::string& confPath);
|
||||||
std::vector<std::string> GetArgs(const std::string& strArg);
|
std::vector<std::string> GetArgs(const std::string& strArg);
|
||||||
/**
|
|
||||||
* 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
|
* Return true if the given argument has been manually set
|
||||||
*
|
*
|
||||||
* @param strArg Argument to get (e.g. "-foo")
|
* @param strArg Argument to get (e.g. "-foo")
|
||||||
* @param default (e.g. "1")
|
* @return true if the argument has been set
|
||||||
* @return command-line argument or default value
|
*/
|
||||||
*/
|
bool IsArgSet(const std::string& strArg);
|
||||||
std::string GetArg(const std::string& strArg, const std::string& strDefault);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return integer argument or default value
|
* Return string argument or default value
|
||||||
*
|
*
|
||||||
* @param strArg Argument to get (e.g. "-foo")
|
* @param strArg Argument to get (e.g. "-foo")
|
||||||
* @param default (e.g. 1)
|
* @param default (e.g. "1")
|
||||||
* @return command-line argument (0 if invalid number) or default value
|
* @return command-line argument or default value
|
||||||
*/
|
*/
|
||||||
int64_t GetArg(const std::string& strArg, int64_t nDefault);
|
std::string GetArg(const std::string& strArg, const std::string& strDefault);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return boolean argument or default value
|
* Return integer argument or default value
|
||||||
*
|
*
|
||||||
* @param strArg Argument to get (e.g. "-foo")
|
* @param strArg Argument to get (e.g. "-foo")
|
||||||
* @param default (true or false)
|
* @param default (e.g. 1)
|
||||||
* @return command-line argument or default value
|
* @return command-line argument (0 if invalid number) or default value
|
||||||
*/
|
*/
|
||||||
bool GetBoolArg(const std::string& strArg, bool fDefault);
|
int64_t GetArg(const std::string& strArg, int64_t nDefault);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set an argument if it doesn't already have a value
|
* Return boolean argument or default value
|
||||||
*
|
*
|
||||||
* @param strArg Argument to set (e.g. "-foo")
|
* @param strArg Argument to get (e.g. "-foo")
|
||||||
* @param strValue Value (e.g. "1")
|
* @param default (true or false)
|
||||||
* @return true if argument gets set, false if it already had a value
|
* @return command-line argument or default value
|
||||||
*/
|
*/
|
||||||
bool SoftSetArg(const std::string& strArg, const std::string& strValue);
|
bool GetBoolArg(const std::string& strArg, bool fDefault);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a boolean argument if it doesn't already have a value
|
* Set an argument if it doesn't already have a value
|
||||||
*
|
*
|
||||||
* @param strArg Argument to set (e.g. "-foo")
|
* @param strArg Argument to set (e.g. "-foo")
|
||||||
* @param fValue Value (e.g. false)
|
* @param strValue Value (e.g. "1")
|
||||||
* @return true if argument gets set, false if it already had a value
|
* @return true if argument gets set, false if it already had a value
|
||||||
*/
|
*/
|
||||||
bool SoftSetBoolArg(const std::string& strArg, bool fValue);
|
bool SoftSetArg(const std::string& strArg, const std::string& strValue);
|
||||||
|
|
||||||
// Forces an arg setting. Called by SoftSetArg() if the arg hasn't already
|
/**
|
||||||
// been set. Also called directly in testing.
|
* Set a boolean argument if it doesn't already have a value
|
||||||
void ForceSetArg(const std::string& strArg, const std::string& strValue);
|
*
|
||||||
|
* @param strArg Argument to set (e.g. "-foo")
|
||||||
|
* @param fValue Value (e.g. false)
|
||||||
|
* @return true if argument gets set, false if it already had a value
|
||||||
|
*/
|
||||||
|
bool SoftSetBoolArg(const std::string& strArg, bool fValue);
|
||||||
|
|
||||||
|
// Forces an arg setting. Called by SoftSetArg() if the arg hasn't already
|
||||||
|
// been set. Also called directly in testing.
|
||||||
|
void ForceSetArg(const std::string& strArg, const std::string& strValue);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern ArgsManager gArgs;
|
extern ArgsManager gArgs;
|
||||||
|
Loading…
Reference in New Issue
Block a user