Class to show how to add a simple command-line argument to an application.
Definition at line 55 of file CommandOption_example_1.cpp.
Public Member Functions | |
CommandOption1Example (const string &applName) | |
Initialize command-line arguments. More... | |
bool | initialize (int argc, char *argv[], bool pretty=true) noexcept override |
Process command-line arguments. More... | |
void | process () override |
Do the processing. More... | |
void | shutDown () override |
Clean up. More... | |
![]() | |
BasicFramework (const std::string &applName, const std::string &applDesc) noexcept | |
bool | run () noexcept |
virtual | ~BasicFramework () |
Destructor. More... | |
Public Attributes | |
CommandOptionWithAnyArg | fileOpt |
Command-line option example. More... | |
CommandOptionRest | restOpt |
Everything else after the above command-line options. More... | |
CommandOptionNoArg | screamOpt |
Another example. More... | |
![]() | |
int | exitCode |
Additional Inherited Members | |
![]() | |
static const int | EXCEPTION_ERROR = 1 |
static const int | EXIST_ERROR = 2 |
static const int | GENERAL_ERROR = 1 |
static const int | OPTION_ERROR = 2 |
![]() | |
virtual void | additionalSetup () |
virtual void | completeProcessing () |
virtual void | spinUp () |
![]() | |
std::string | appDesc |
Description of program's function. More... | |
std::string | argv0 |
Name of the program. More... | |
int | debugLevel |
Debug level for this run of the program. More... | |
CommandOptionNoArg | debugOption |
Enable/increase debugging output. More... | |
CommandOptionHelpUsage | helpOption |
Request command-line option usage. More... | |
int | verboseLevel |
Verbose level for this run of the program. More... | |
CommandOptionNoArg | verboseOption |
Enable/increase informational output. More... | |
CommandOption1Example::CommandOption1Example | ( | const string & | applName | ) |
Initialize command-line arguments.
Definition at line 76 of file CommandOption_example_1.cpp.
|
overridevirtualnoexcept |
Process command-line arguments.
Reimplemented from gnsstk::BasicFramework.
Definition at line 87 of file CommandOption_example_1.cpp.
|
overridevirtual |
Do the processing.
Reimplemented from gnsstk::BasicFramework.
Definition at line 118 of file CommandOption_example_1.cpp.
|
overridevirtual |
Clean up.
Reimplemented from gnsstk::BasicFramework.
Definition at line 125 of file CommandOption_example_1.cpp.
CommandOptionWithAnyArg CommandOption1Example::fileOpt |
Command-line option example.
Definition at line 67 of file CommandOption_example_1.cpp.
CommandOptionRest CommandOption1Example::restOpt |
Everything else after the above command-line options.
Definition at line 71 of file CommandOption_example_1.cpp.
CommandOptionNoArg CommandOption1Example::screamOpt |
Another example.
Definition at line 69 of file CommandOption_example_1.cpp.