diff --git a/docs/manual.html b/docs/manual.html index 07ac00e..fe3bc1e 100644 --- a/docs/manual.html +++ b/docs/manual.html @@ -2,7 +2,7 @@
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 @@ -163,13 +163,15 @@ argument is required to be present (SwitchArgs can't be required, as that would defeat the purpose).
+
There are two primary types of arguments:
@@ -226,12 +228,12 @@ 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 -have access to sstream. Our understanding is that, -this should not be a problem for VC 7.x. However, if this +have access to sstream. Our understanding is that +this should not be a problem for VC++ 7.x. However, if this is not the case and you need to use strstream, then simply tell your compiler to define the variable HAVE_STRSTREAM and undefine @@ -239,9 +241,20 @@ 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, +then you have two options. Either comment out the statements if you don't +need two stage name lookup, or do a bunch of search and replace and use +the this pointer syntax: e.g. +this->_ignoreable instead +of just _ignorable (do this for each variable +or method referenced by using). +
Table of Contents
+argument...
Naturally, what we have seen to this point doesn't satisfy all of our needs.
@@ -546,6 +559,39 @@ is an example: cmd.parse(argc,argv);
+
+It is straightforward to change the output generated by +TCLAP. Either subclass the +StdOutput class and re-implement the methods you choose, +or write your own class that implements the +CmdLineOutput interface. Once you have done this, +then use the CmdLine setOutput +method to tell the CmdLine to use your new output +class. Here is a simple example: +
+class MyOutput : public StdOutput +{ + public: + virtual void failure(CmdLineInterface& c, ArgException& e) + { + cerr << "My special failure message for: " << endl + << e.what() << endl; + } +}; + +int main(int argc, char** argv) +{ + CmdLine cmd("this is a message", ' ', "0.99" ); + + // set the output + MyOutput my; + cmd.setOutput( &my ); + + // proceed normally ... +
+ +See test4.cpp in the examples directory for the full +example.
Table of Contents
Like all good rules, there are many exceptions....
-Disclaimer: Almost no one will have any use for Visitors, they were +Disclaimer: Almost no one will have any use for +Visitors, they were added to provide special handling for default arguments. Nothing -that Visitors do couldn't be accomplished by the user after the +that Visitors do couldn't be accomplished +by the user after the command line has been parsed. If you're still interested, keep reading...
diff --git a/docs/manual.xml b/docs/manual.xml
index 70dbfc0..9592f31 100644
--- a/docs/manual.xml
+++ b/docs/manual.xml
@@ -230,13 +230,15 @@ required or entered on the command line.