Provides basic application functionality.
More...
#include <App.h>
|
|
| App () |
| | Constructs an App object.
|
| |
|
virtual | ~App () |
| | Destroys an App object.
|
| |
| virtual int | run (int argc, char *argv[]) |
| | Runs the application. More...
|
| |
|
|
std::string | description |
| | The application description.
|
| |
|
std::string | version |
| | The application version.
|
| |
|
| virtual void | defineOptions (const char *argv0) |
| | Defines which command-line options are supported by the application, as well as any help text that is displayed. More...
|
| |
| virtual int | mainLoop () |
| | Defines the application's main processing loop. More...
|
| |
Provides basic application functionality.
Applications using this class as a base should override the following:
The entry point for running the application processing loop is run().
Definition at line 434 of file App.h.
◆ defineOptions()
| void defineOptions |
( |
const char * |
argv0 | ) |
|
|
protectedvirtual |
Defines which command-line options are supported by the application, as well as any help text that is displayed.
The option parser, available through member variable _optParser, is an AppOptionParser object.
- Parameters
-
| argv0 | The name of the executable, as passed into the program via argv[0]. |
Definition at line 661 of file App.cpp.
◆ mainLoop()
Defines the application's main processing loop.
The base-class implementation of this method does nothing, and returns 0. Derived classes must override this method for the application to perform any useful work.
Definition at line 673 of file App.cpp.
◆ run()
| int run |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
virtual |
Runs the application.
- Parameters
-
| argc | The number of arguments specified on the command line, counting the executable name itself. |
| argv | The list of arguments specified on the command line, including the executable name itself. |
- Returns
- An integer whose return value is passed up to the host operating system as a return code. This is application-dependent, but the following return codes are generated as a result of command-line argument/option processing:
- 1 = error encountered in option processing
- 2 = usage information was requested
- 3 = version information was requested
Definition at line 652 of file App.cpp.
The documentation for this class was generated from the following files:
- /home/abuild/rpmbuild/BUILD/libcyberradio-24.10.14/libcyberradio/include/LibCyberRadio/Common/App.h
- /home/abuild/rpmbuild/BUILD/libcyberradio-24.10.14/libcyberradio/libcyberradio/Common/App.cpp