diff --git a/docs/manual.html b/docs/manual.html index f11d7c1..59d2b7c 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -1,17 +1,18 @@ -
Table of Contents
Table of Contents
Table of Contents
+argument...
Table of Contents
TCLAP has a few key classes to be aware of. The first is the CmdLine (command line) class. This class parses the command line passed to it according to the arguments that it contains. Arguments are separate objects that are added to the -CmdLine object one at a time. The five +CmdLine object one at a time. The six argument classes are: ValueArg, UnlabeledValueArg, -SwitchArg, MultiArg and +SwitchArg, MultiSwitchArg, +MultiArg and UnlabeledMultiArg. These classes are templatized, which means they can be defined to parse a value of any type**. Once you add the @@ -228,7 +229,7 @@ to work on Windows, Sun and Alpha platforms. We've made every effort to keep the library compliant with the ANSI C++ standard so if your compiler meets the standard, then this library should work for you. Please let us know if this is not the case! -
+
As we understand things, Visual C++ does not have the file config.h which is used to make platform specific definitions. In this situation, we assume that you @@ -241,7 +242,7 @@ then simply tell your compiler to define the variable should work. We think. Alternatively, just edit the files ValueArg.h and MultiArg.h.
-
+
If your compiler doesn't support the using syntax used in UnlabeledValueArg and UnlabeledMultiArg to support two stage name lookup, @@ -317,6 +318,22 @@ a ValueArg: Note that MultiArgs can be added to the CmdLine in any order (unlike UnlabeledMultiArg). +
+New Feature! MultiSwitchArg now +allows you to set a switch multiple times on the command line. The call +to getValue() returns the number (int) of times +the switch +has been found on the command line in addition to the default value. +Here is an example using the default initial value of 0: +
+ MultiSwitchArg quiet("q","quiet","Reduce the volume of output"); + cmd.add( quiet ); +
+Alternatively, you can specify your own initial value: +
+ MultiSwitchArg quiet("q","quiet","Reduce the volume of output",5); + cmd.add( quiet ); +
To this point all of our arguments have had labels (flags) indentifying them on the command line, but there are some @@ -621,7 +638,7 @@ example. NOTE: if you supply your own Out will not delete it in the CmdLine destructor. This could lead to a (very small) memory leak if you don't take care of the object yourself. -
Table of Contents
+
Table of Contents
Like all good rules, there are many exceptions....
The -- flag is automatically included in the @@ -645,14 +662,9 @@ ignore arguments after the --. To accomodate t we can make both UnlabeledValueArgs and UnlabeledMultiArgs ignoreable in their constructors. See the API Documentation for details. -
-If you absolutely must allow for multiple, identical switches, then -don't use a SwitchArg, instead use a -MultiArg of type -bool. This means you'll need to specify a 1 or 0 on the -command line with the switch (as values are required), but this -should allow you to turn your favorite switch on and off to your -heart's content. +
+No longer a problem! Just use MultiSwitchArg. +There is a description here.
Ideally this library would use RTTI to return a human readable name
of the type declared for a particular argument. Unfortunately, at
diff --git a/docs/manual.xml b/docs/manual.xml
index 1d97068..aa75498 100644
--- a/docs/manual.xml
+++ b/docs/manual.xml
@@ -30,7 +30,7 @@