A.5_Command_Line_Parsing
A.5 Command Line Parsing
A portable command line parsing library (only about 100 lines of C++) is in chCommandLine.h. It includes the templated function chCommandLineGet(), which passes back a variable of a given type, and chCommandLineGetBool(), which returns whether a given keyword was given in the command line.
template<typename T> T
chCommandLineGet(T *p, const char *keyword, int argc, char *argv[])As described in the previous section, a specialization of chCommandLineGet () will pass back an instance of chShmooRange. In order for this specialization to be compiled, chShmoo.h must be included before chCommandLine.h.