Defines a command-line option that is supported by an application.
More...
#include <App.h>
|
| std::string | shortName |
| | Short option name, without leading hyphen.
|
| std::string | longName |
| | Long option name, without leading hyphens.
|
| int | valueType |
| | Type of value that this option sets.
|
|
void * | valuePtr |
| | Pointer to a variable that holds the option value.
|
|
std::string | helpArgName |
| | Option argument name to display in the help text.
|
|
std::string | helpText |
| | Option help text.
|
| bool | showDefault |
| | Show the default value in the option help text.
|
|
|
static int | TYPE_NONE |
| | Option does not set a value.
|
|
static int | TYPE_INTEGER |
| | Option sets an integer value.
|
|
static int | TYPE_FLOAT |
| | Option sets a floating-point value.
|
|
static int | TYPE_DOUBLE |
| | Option sets a double-precision floating-point value.
|
|
static int | TYPE_STRING |
| | Option sets a string value.
|
|
static int | TYPE_BOOLEAN |
| | Option explicitly sets a boolean value.
|
|
static int | TYPE_BOOLEAN_SET_TRUE |
| | Option sets a boolean value that is False by default but becomes True if this option is specified.
|
|
static int | TYPE_BOOLEAN_SET_FALSE |
| | Option sets a boolean value that is True by default but becomes False if this option is specified.
|
Defines a command-line option that is supported by an application.
Definition at line 28 of file App.h.
◆ AppOption() [1/2]
| AppOption |
( |
const std::string & | shortName, |
|
|
const std::string & | longName, |
|
|
int | valueType, |
|
|
void * | valuePtr, |
|
|
const std::string & | helpArgName, |
|
|
const std::string & | helpText, |
|
|
bool | showDefault ) |
Constructs an AppOption object from initial parameters.
- Parameters
-
| shortName | Short option name, without leading hyphen. If empty, this option does not support short format. |
| longName | Long option name, without leading hyphens. If empty, this option does not support long format. |
| valueType | Type of value that this option sets. Must be one of the AppOption::TYPE_* constants. |
| valuePtr | Pointer to a variable that holds the option value. |
| helpArgName | Option argument name to display in the help text. |
| helpText | Option help text. |
| showDefault | Whether or not to show the default value of the option in the help text. The default value will be appended to the help text given in helpText. |
Definition at line 44 of file App.cpp.
◆ AppOption() [2/2]
Constructs an AppOption object as a copy of another.
- Parameters
-
Definition at line 58 of file App.cpp.
◆ operator=()
Makes one AppOption object equivalent to another.
- Parameters
-
Definition at line 69 of file App.cpp.
◆ longName
Long option name, without leading hyphens.
If empty, this option does not support long format.
Definition at line 91 of file App.h.
◆ shortName
Short option name, without leading hyphen.
If empty, this option does not support short format.
Definition at line 86 of file App.h.
◆ showDefault
Show the default value in the option help text.
The default value is obtained from the variable pointed to by valuePtr.
Definition at line 113 of file App.h.
◆ valueType
Type of value that this option sets.
Must be one of the AppOption::TYPE_* constants.
Definition at line 96 of file App.h.
The documentation for this class was generated from the following files:
- /home/abuild/rpmbuild/BUILD/libcyberradio-24.10.14-build/libcyberradio-24.10.14/libcyberradio/include/LibCyberRadio/Common/App.h
- /home/abuild/rpmbuild/BUILD/libcyberradio-24.10.14-build/libcyberradio-24.10.14/libcyberradio/libcyberradio/Common/App.cpp