#include <util.h>
|
void | ParseParameters (int argc, const char *const argv[]) |
|
void | ReadConfigFile (const std::string &confPath) |
|
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...
|
|
std::string | GetArg (const std::string &strArg, const std::string &strDefault) const |
| Return string argument or default value. More...
|
|
int64_t | GetArg (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) |
|
Definition at line 222 of file util.h.
◆ ForceSetArg()
void ArgsManager::ForceSetArg |
( |
const std::string & |
strArg, |
|
|
const std::string & |
strValue |
|
) |
| |
◆ GetArg() [1/2]
std::string ArgsManager::GetArg |
( |
const std::string & |
strArg, |
|
|
const std::string & |
strDefault |
|
) |
| const |
Return string argument or default value.
- Parameters
-
strArg | Argument to get (e.g. "-foo") |
strDefault | (e.g. "1") |
- Returns
- command-line argument or default value
Definition at line 454 of file util.cpp.
◆ GetArg() [2/2]
int64_t ArgsManager::GetArg |
( |
const std::string & |
strArg, |
|
|
int64_t |
nDefault |
|
) |
| const |
Return integer argument or default value.
- Parameters
-
strArg | Argument to get (e.g. "-foo") |
nDefault | (e.g. 1) |
- Returns
- command-line argument (0 if invalid number) or default value
Definition at line 462 of file util.cpp.
◆ GetArgs()
std::vector< std::string > ArgsManager::GetArgs |
( |
const std::string & |
strArg | ) |
const |
Return a vector of strings of the given argument.
- Parameters
-
strArg | Argument to get (e.g. "-foo") |
- Returns
- command-line arguments
Definition at line 440 of file util.cpp.
◆ GetBoolArg()
bool ArgsManager::GetBoolArg |
( |
const std::string & |
strArg, |
|
|
bool |
fDefault |
|
) |
| const |
Return boolean argument or default value.
- Parameters
-
strArg | Argument to get (e.g. "-foo") |
fDefault | (true or false) |
- Returns
- command-line argument or default value
Definition at line 470 of file util.cpp.
◆ IsArgSet()
bool ArgsManager::IsArgSet |
( |
const std::string & |
strArg | ) |
const |
Return true if the given argument has been manually set.
- Parameters
-
strArg | Argument to get (e.g. "-foo") |
- Returns
- true if the argument has been set
Definition at line 448 of file util.cpp.
◆ ParseParameters()
void ArgsManager::ParseParameters |
( |
int |
argc, |
|
|
const char *const |
argv[] |
|
) |
| |
◆ ReadConfigFile()
void ArgsManager::ReadConfigFile |
( |
const std::string & |
confPath | ) |
|
◆ SoftSetArg()
bool ArgsManager::SoftSetArg |
( |
const std::string & |
strArg, |
|
|
const std::string & |
strValue |
|
) |
| |
Set an argument if it doesn't already have a value.
- Parameters
-
strArg | Argument to set (e.g. "-foo") |
strValue | Value (e.g. "1") |
- Returns
- true if argument gets set, false if it already had a value
Definition at line 478 of file util.cpp.
◆ SoftSetBoolArg()
bool ArgsManager::SoftSetBoolArg |
( |
const std::string & |
strArg, |
|
|
bool |
fValue |
|
) |
| |
Set a boolean argument if it doesn't already have a value.
- Parameters
-
strArg | Argument to set (e.g. "-foo") |
fValue | Value (e.g. false) |
- Returns
- true if argument gets set, false if it already had a value
Definition at line 486 of file util.cpp.
◆ cs_args
◆ mapArgs
std::map<std::string, std::string> ArgsManager::mapArgs |
|
protected |
◆ mapMultiArgs
std::map<std::string, std::vector<std::string> > ArgsManager::mapMultiArgs |
|
protected |
The documentation for this class was generated from the following files: