diff --git a/docs/manual.html b/docs/manual.html index 5a12863..9b0f04c 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -1,7 +1,7 @@ -
Copyright © 2003,2004,2005,2006,2009,2011 Michael E. Smoot
Table of Contents
Table of Contents
+
Copyright © 2003,2004,2005,2006,2009,2011,2012 Michael E. Smoot
Table of Contents
Table of Contents
Table of Contents
+argument...
Naturally, what we have seen to this point doesn't satisfy all of our needs.
@@ -703,6 +703,47 @@ ignore arguments after the --
. To accomm
we can make both UnlabeledValueArg
s and
UnlabeledMultiArg
s ignoreable in their constructors.
See the API Documentation for details.
+
+By default, if TCLAP sees an argument that doesn't
+match a specified Arg
, it will produce an exception.
+This strict handling provides some assurance that all input to a program
+is controlled. However, there are times when
+this strict handling of arguments might not be desirable. The alternative
+that TCLAP provides is to simply ignore any unmatched
+arguments on the command line. This is accomplished by calling the
+ignoreUnmatched
method with
+true
on the
+CmdLine
object that's been constructed.
+
+
+ + // Define the command line object. + CmdLine cmd("Command description message", ' ', "0.9"); + + // Tell the command line to ignore any unmatched args. + cmd.ignoreUnmatched(true); + + // Define a value argument and add it to the command line. + ValueArg<string> nameArg("n","name","Name to print",true,"homer","string"); + cmd.add( nameArg ); + + // Parse the args. + cmd.parse( argc, argv ); + +
+ +Given the program above, if a user were to type: + +
+ + % command -n Mike something to ignore + +
+
+The program would succeed and the name ValueArg
+would be populated with "Mike" but
+the strings "something", "to", and "ignore" would simply be ignored by the
+parser.
Sometimes it's desirable to read integers formatted in decimal, hexadecimal,
and octal format. This is now possible by #defining the TCLAP_SETBASE_ZERO
diff --git a/docs/manual.xml b/docs/manual.xml
index 2f20d71..6a068a8 100644
--- a/docs/manual.xml
+++ b/docs/manual.xml
@@ -30,7 +30,7 @@