From 7730bf0d6291ff38950c49acbb73f37b0dd42986 Mon Sep 17 00:00:00 2001 From: mes5k Date: Fri, 3 Jun 2005 02:33:49 +0000 Subject: [PATCH] Unlabeled changes --- examples/test2.cpp | 2 +- examples/test3.cpp | 3 ++- examples/test7.cpp | 3 ++- examples/test8.cpp | 2 +- examples/test9.cpp | 7 +++++++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/examples/test2.cpp b/examples/test2.cpp index 4f7627e..8e0ebfe 100644 --- a/examples/test2.cpp +++ b/examples/test2.cpp @@ -66,7 +66,7 @@ void parseOptions(int argc, char** argv) "default","string"); cmd.add( utest ); - UnlabeledMultiArg mtest("fileName", "file names", "string"); + UnlabeledMultiArg mtest("fileName", "file names", false, "string"); cmd.add( mtest ); // diff --git a/examples/test3.cpp b/examples/test3.cpp index d93fd0e..89508fb 100644 --- a/examples/test3.cpp +++ b/examples/test3.cpp @@ -58,7 +58,8 @@ void parseOptions(int argc, char** argv) MultiArg ftest("f", "floatTest", "multi float test", false,"float" ); cmd.add( ftest ); - UnlabeledMultiArg mtest("fileName","file names","fileNameString"); + UnlabeledMultiArg mtest("fileName","file names",false, + "fileNameString"); cmd.add( mtest ); // // Parse the command line. diff --git a/examples/test7.cpp b/examples/test7.cpp index b4ab6de..d06edb8 100644 --- a/examples/test7.cpp +++ b/examples/test7.cpp @@ -30,7 +30,8 @@ int main(int argc, char** argv) iallowed.push_back(3); ValuesConstraint iiallowed( iallowed ); - UnlabeledMultiArg intArg("times","Number of times to print",&iiallowed); + UnlabeledMultiArg intArg("times","Number of times to print",false, + &iiallowed); cmd.add( intArg ); // Ignore the names and comments! These args mean nothing (to this diff --git a/examples/test8.cpp b/examples/test8.cpp index 08eee28..c31cc63 100644 --- a/examples/test8.cpp +++ b/examples/test8.cpp @@ -53,7 +53,7 @@ void parseOptions(int argc, char** argv) MultiArg ftest("f", "floatTest", "multi float test", false,"float", cmd ); - UnlabeledMultiArg mtest("fileName","file names", + UnlabeledMultiArg mtest("fileName","file names", false, "fileNameString", cmd); // // Parse the command line. diff --git a/examples/test9.cpp b/examples/test9.cpp index c30aa0d..f32fbe8 100644 --- a/examples/test9.cpp +++ b/examples/test9.cpp @@ -25,6 +25,13 @@ int main(int argc, char** argv) "won't see this",false); cmd.add( word ); + // Uncommenting the next arg will (correctly) cause an exception + // to be thrown. + +// UnlabeledMultiArg badword("badword","a bad word", false,"string"); +// +// cmd.add( badword ); + cmd.parse( argc, argv ); bool reverseName = reverseSwitch.getValue();