Go to the documentation of this file.
15 #include "../../include/ecl/command_line.hpp"
35 int main(
int argc,
char** argv) {
41 std::cout << std::endl;
42 std::cout <<
"***********************************************************" << std::endl;
43 std::cout <<
" Command Line Parsing" << std::endl;
44 std::cout <<
"***********************************************************" << std::endl;
45 std::cout << std::endl;
49 CmdLine cmd(
"This is a test program to test the command line parsing facilities provided by TCLAP.");
53 SwitchArg debugSwitch(
"d",
"debug",
"Enable debugging.");
59 ValueArg<int> intArg(
"i",
"integer",
"An integer argument for testing.",
false,5,
"integer");
76 cerr <<
"error: " << e.
error() <<
" for arg " << e.
argId() << endl;
79 cout <<
"Test Integer: " << test << endl;
81 cout <<
"Debug Switch (bool): true" << endl;
83 cout <<
"Debug Switch (bool): false" << endl;
85 std::cout <<
"Echoing unlabelled arg: " << nolabel << std::endl;
86 std::cout << std::endl;
int main(int argc, char **argv)
Manages the command line parsing object.
Defines the exception that is thrown whenever a command line is created and parsed.
std::string argId() const
std::string error() const
void parse(int argc, char **argv)
ecl_command_line
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:13