summaryrefslogtreecommitdiff
path: root/src/tests/optparser.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-12-18 16:07:31 +0000
committerMike Buland <eichlan@xagasoft.com>2009-12-18 16:07:31 +0000
commit2cbc634b3b603ec67c6c312bd18177cd52c71b63 (patch)
treead743e9cd660f325e1020cdea4f746938d102261 /src/tests/optparser.cpp
parent038815ae3a019ac56fa1c62e18c5861166d3a975 (diff)
downloadlibbu++-2cbc634b3b603ec67c6c312bd18177cd52c71b63.tar.gz
libbu++-2cbc634b3b603ec67c6c312bd18177cd52c71b63.tar.bz2
libbu++-2cbc634b3b603ec67c6c312bd18177cd52c71b63.tar.xz
libbu++-2cbc634b3b603ec67c6c312bd18177cd52c71b63.zip
Ok...sweet, the OptParser now supports everything the old one did, but in much
less code, and it does everything with more style and panache, also fewer bugs.
Diffstat (limited to 'src/tests/optparser.cpp')
-rw-r--r--src/tests/optparser.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/optparser.cpp b/src/tests/optparser.cpp
index f5df7ed..5c91351 100644
--- a/src/tests/optparser.cpp
+++ b/src/tests/optparser.cpp
@@ -40,6 +40,8 @@ public:
40 setOverride("str", "Bob!"); 40 setOverride("str", "Bob!");
41 41
42 addHelpOption(); 42 addHelpOption();
43
44 setNonOption( slot( this, &Opts::nonOption ) );
43 } 45 }
44 46
45 int yesparam( StrArray aParams ) 47 int yesparam( StrArray aParams )
@@ -54,6 +56,12 @@ public:
54 return 0; 56 return 0;
55 } 57 }
56 58
59 int nonOption( StrArray aParams )
60 {
61 sio << " - nonOption" << aParams << sio.nl;
62 return aParams.getSize()-1;
63 }
64
57 int iBob; 65 int iBob;
58 float dBob; 66 float dBob;
59 Bu::FString sVar; 67 Bu::FString sVar;