mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-08 20:00:04 -04:00
Unlabeled changes
This commit is contained in:
parent
d46a014716
commit
7730bf0d62
@ -66,7 +66,7 @@ void parseOptions(int argc, char** argv)
|
||||
"default","string");
|
||||
cmd.add( utest );
|
||||
|
||||
UnlabeledMultiArg<string> mtest("fileName", "file names", "string");
|
||||
UnlabeledMultiArg<string> mtest("fileName", "file names", false, "string");
|
||||
cmd.add( mtest );
|
||||
|
||||
//
|
||||
|
@ -58,7 +58,8 @@ void parseOptions(int argc, char** argv)
|
||||
MultiArg<float> ftest("f", "floatTest", "multi float test", false,"float" );
|
||||
cmd.add( ftest );
|
||||
|
||||
UnlabeledMultiArg<string> mtest("fileName","file names","fileNameString");
|
||||
UnlabeledMultiArg<string> mtest("fileName","file names",false,
|
||||
"fileNameString");
|
||||
cmd.add( mtest );
|
||||
//
|
||||
// Parse the command line.
|
||||
|
@ -30,7 +30,8 @@ int main(int argc, char** argv)
|
||||
iallowed.push_back(3);
|
||||
ValuesConstraint<int> iiallowed( iallowed );
|
||||
|
||||
UnlabeledMultiArg<int> intArg("times","Number of times to print",&iiallowed);
|
||||
UnlabeledMultiArg<int> intArg("times","Number of times to print",false,
|
||||
&iiallowed);
|
||||
cmd.add( intArg );
|
||||
|
||||
// Ignore the names and comments! These args mean nothing (to this
|
||||
|
@ -53,7 +53,7 @@ void parseOptions(int argc, char** argv)
|
||||
MultiArg<float> ftest("f", "floatTest", "multi float test", false,"float",
|
||||
cmd );
|
||||
|
||||
UnlabeledMultiArg<string> mtest("fileName","file names",
|
||||
UnlabeledMultiArg<string> mtest("fileName","file names", false,
|
||||
"fileNameString", cmd);
|
||||
//
|
||||
// Parse the command line.
|
||||
|
@ -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<string> badword("badword","a bad word", false,"string");
|
||||
//
|
||||
// cmd.add( badword );
|
||||
|
||||
cmd.parse( argc, argv );
|
||||
|
||||
bool reverseName = reverseSwitch.getValue();
|
||||
|
Loading…
x
Reference in New Issue
Block a user