![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Input command line argument parser. More...
#include <inputParser.h>
Public Member Functions | |
| InputParser (int &argc, char **argv) | |
| Constructor. | |
| const std::string & | getCmdOption (const std::string &option) const |
| Get value of argument specified by key. | |
| bool | cmdOptionExists (const std::string &option) const |
| Check if argument exists. | |
Private Attributes | |
| std::vector< std::string > | tokens |
| Tokens. | |
Input command line argument parser.
source - https://stackoverflow.com/a/868894
Definition at line 28 of file inputParser.h.
|
inline |
Constructor.
| argc | Number of arguments |
| argv | Strings |
Definition at line 35 of file inputParser.h.
References tokens.
|
inline |
Check if argument exists.
| option | Argument name/key |
Definition at line 60 of file inputParser.h.
References tokens.
Referenced by anonymous_namespace{main.cpp}::buildInputJson(), and main().
|
inline |
Get value of argument specified by key.
| option | Argument name/key |
Definition at line 45 of file inputParser.h.
References tokens.
Referenced by anonymous_namespace{main.cpp}::buildInputJson(), and main().
|
private |
Tokens.
Definition at line 66 of file inputParser.h.
Referenced by cmdOptionExists(), getCmdOption(), and InputParser().