Generic usage function option record. More...
#include "rdmcmdlinetypes.h"
Data Fields |
|
const char * | optShort |
const char * | optLong |
const char * | arg |
const char * | desc |
Detailed Description
Generic usage function option record.
- Examples
- core02Example_main.c, core03Example_main.c, core04Example_main.c, core05Example_main.c, core06Example_main.c, core07Example_main.c, core08Example_main.c, core09Example_main.c, core10Example_main.c, core11Example_main.c, core12Example_main.c, core13Example_main.c, core20Example_main.c, core21Example_main.c, core22Example_main.c, core23Example_main.c, core24Example_main.c, core25Example_main.c, core38Example_main.c, cpp50Example_main.cpp, cpp55Example_main.cpp, and cpp70Example_main.cpp.
Field Documentation
arg
const char* RDM_CMDLINE_OPT::arg |
Option argument or argument.
An option that takes arguments have an entry here with any of these formats:
- s =... for a string option argument,
- i=... for an integer option argument, and
- c=. for a single character option argument.
A standalone argument have an entry here with any of these formats:
- #=... for a single command line argument,
- *=... for zero or more command line arguments, and
- ?=... for an optional argument.
It only makes sense to have one '*=...' and it should always be the second last element in the array of command line parsing options. The string after the equal sign (shown above as '...') is a documentation string for the argument.
desc
const char* RDM_CMDLINE_OPT::desc |
Option or argument description. This string is only for documentation purposes and will be printed with the '-h' or '-help' option.
optLong
const char* RDM_CMDLINE_OPT::optLong |
Long option is a string of at least a few characters used to match against. A long option is a command line option that starts with '-' followed by the exact sequence of characters specified here.
rdm_cmdlineNextLongOption will return this string for a match except when it is NULL.
optShort
const char* RDM_CMDLINE_OPT::optShort |
Short option is a single character used to match against. A short option is a command line option that starts with '-' followed by a sequence of characters where one of these characters are the one specified here. rdm_cmdlineNextShortOption (and rdm_cmdlineNextLongOption when optLong is NULL) will return this string for a match.
The last element in the array of command line parsing options should have optShort set to NULL.
The documentation for this struct was generated from the following file: