From 146930268a695dcc0432599d625ec3eb7e74025e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 18 Dec 2009 08:59:16 +0000 Subject: The OptParser still needs help banners and more helper functions, but otherwise, it's done. It works great, and provides much flexibility and usefulness. It now relies on the input side of the Formatter class, which at the moment supports reading strings...not real useful yet... Next up, adding readers for numbers and such, then it'll be mostly complete. Also, fixed a bug when copying uninitialized signal objects. --- src/tests/optparser.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/tests') diff --git a/src/tests/optparser.cpp b/src/tests/optparser.cpp index ee2ea58..5cf82bd 100644 --- a/src/tests/optparser.cpp +++ b/src/tests/optparser.cpp @@ -23,6 +23,8 @@ public: o2.bShortHasParams = false; o2.sHelp = "This is the second test parameter. It does not take parameters. However, I do want to make this part much longer to see how it looks when you add way too much text to one of these things. It can't really be that bad, right?"; addOption( o2 ); + + addOption( 's', "str", sVar, "Set a variable, see what it does.", "bob!"); addHelpOption('h', "help", "This help."); } @@ -35,6 +37,7 @@ public: } int iBob; + Bu::FString sVar; }; int main( int argc, char *argv[] ) @@ -42,5 +45,7 @@ int main( int argc, char *argv[] ) Opts o; o.parse( argc, argv ); + + sio << "sVar = \"" << o.sVar << "\"" << sio.nl; } -- cgit v1.2.3