Added --help and --version options to hotspot v4.1.0 binary#1
Added --help and --version options to hotspot v4.1.0 binary#1alexpreynolds wants to merge 1 commit intorthurman:masterfrom
Conversation
|
Sounds great, Alex; thanks. I'll talk to you about making sure I'm doing On Thu, Apr 17, 2014 at 1:02 PM, Alex Reynolds notifications@github.comwrote:
Bob Thurman, Ph.D. 2211 Elliott Avenue Foege Building S-310 206-267-1091 x207 206-685-2784 |
(Hi Bob, just to explain, this is a "pull request", which means anyone can submit code, which you can decide whether or not to approve going into your project's source code. You can review the changes by clicking on the "Files changed" tab above this message window.)
I added code so that users can type in the option
-hor--helpto get a usage statement sent to standard output (exiting with a zero error code), and-vor--versionto get the hotspot binary version and author/citation details sent to standard output (exiting with a zero error code).If the incorrect number of arguments are specified, the binary still prints the same usage statement, but it is sent to standard error (exiting with the same non-zero error code as before).
These options work by throwing different types of custom exceptions, which can be modified in and added to in the
hotspotnamespace inCluster.cpp, as more options are added down the road. Thehotspotnamespace is also where the version, author and citation strings are kept, for easy modification as new versions of the application are published.The
--versionoption format tries to follow the pattern used in BEDOPS tools, although the layout and content is easily modified by editing the output of thehotspot::Version()function inCluster.cpp.