mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-09 20:33:39 -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");
|
"default","string");
|
||||||
cmd.add( utest );
|
cmd.add( utest );
|
||||||
|
|
||||||
UnlabeledMultiArg<string> mtest("fileName", "file names", "string");
|
UnlabeledMultiArg<string> mtest("fileName", "file names", false, "string");
|
||||||
cmd.add( mtest );
|
cmd.add( mtest );
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -58,7 +58,8 @@ void parseOptions(int argc, char** argv)
|
|||||||
MultiArg<float> ftest("f", "floatTest", "multi float test", false,"float" );
|
MultiArg<float> ftest("f", "floatTest", "multi float test", false,"float" );
|
||||||
cmd.add( ftest );
|
cmd.add( ftest );
|
||||||
|
|
||||||
UnlabeledMultiArg<string> mtest("fileName","file names","fileNameString");
|
UnlabeledMultiArg<string> mtest("fileName","file names",false,
|
||||||
|
"fileNameString");
|
||||||
cmd.add( mtest );
|
cmd.add( mtest );
|
||||||
//
|
//
|
||||||
// Parse the command line.
|
// Parse the command line.
|
||||||
|
@ -30,7 +30,8 @@ int main(int argc, char** argv)
|
|||||||
iallowed.push_back(3);
|
iallowed.push_back(3);
|
||||||
ValuesConstraint<int> iiallowed( iallowed );
|
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 );
|
cmd.add( intArg );
|
||||||
|
|
||||||
// Ignore the names and comments! These args mean nothing (to this
|
// 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",
|
MultiArg<float> ftest("f", "floatTest", "multi float test", false,"float",
|
||||||
cmd );
|
cmd );
|
||||||
|
|
||||||
UnlabeledMultiArg<string> mtest("fileName","file names",
|
UnlabeledMultiArg<string> mtest("fileName","file names", false,
|
||||||
"fileNameString", cmd);
|
"fileNameString", cmd);
|
||||||
//
|
//
|
||||||
// Parse the command line.
|
// Parse the command line.
|
||||||
|
@ -25,6 +25,13 @@ int main(int argc, char** argv)
|
|||||||
"won't see this",false);
|
"won't see this",false);
|
||||||
cmd.add( word );
|
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 );
|
cmd.parse( argc, argv );
|
||||||
|
|
||||||
bool reverseName = reverseSwitch.getValue();
|
bool reverseName = reverseSwitch.getValue();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user