diff options
Diffstat (limited to 'src/options.cpp')
-rw-r--r-- | src/options.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/options.cpp b/src/options.cpp new file mode 100644 index 0000000..ef46e82 --- /dev/null +++ b/src/options.cpp | |||
@@ -0,0 +1,24 @@ | |||
1 | #include "options.h" | ||
2 | |||
3 | #include "unitnumber.h" | ||
4 | |||
5 | Options::Options( int argc, char *argv[] ) | ||
6 | { | ||
7 | addOption( Bu::slot(this, &Options::selfTest), "self-test", | ||
8 | "Run a series of tests to ensure everything is working correctly."); | ||
9 | addHelpOption('h', "help", "This help"); | ||
10 | |||
11 | parse( argc, argv ); | ||
12 | } | ||
13 | |||
14 | Options::~Options() | ||
15 | { | ||
16 | } | ||
17 | |||
18 | int Options::selfTest( Bu::StringArray aArgs ) | ||
19 | { | ||
20 | UnitNumber().run(); | ||
21 | |||
22 | exit( 0 ); | ||
23 | } | ||
24 | |||