39 Commits

Author SHA1 Message Date
mes5k
122b50e26d patch that allows arg start strings to be pound defined to easily conform to different platforms 2011-04-11 00:08:41 +00:00
mes5k
4ba45abdb9 minor reformat 2011-01-02 23:12:56 +00:00
mes5k
e9dfb0394b fixed all effective c++ warnings based on patch from Andrew Marlow 2011-01-02 18:50:47 +00:00
mes5k
65376234b2 added support for resetting a command line 2009-01-10 00:05:57 +00:00
mes5k
352a838666 added support for parsing hex and octal ints as well as small fix to support gcc 4.4 2008-11-07 20:04:18 +00:00
zeekec
8769a07cee Silence some compiler warnings. The const on return-by-value is ignored. 2008-08-19 21:52:32 +00:00
mes5k
cad795c4b8 tweaked tests to support dashes in arg names 2008-05-06 06:02:02 +00:00
mes5k
e8a8b330e3 allowed dash char in arg names 2008-05-06 05:28:12 +00:00
macbishop
e021e21520 Refactoring of the arg-traits functionality. The purpose is to make it
easier to make you own classes, and types defined in the standard
library work well with tclap. I'll try to write up some documenation
of how to achieve this as-well.
2007-10-09 18:18:51 +00:00
mes5k
891ad51730 fixed the delimiter in Arg::longID and Arg::shortID 2007-09-13 02:09:48 +00:00
macbishop
b4787eb4bd Suppress some warnings, compile with -Wextra by default 2007-09-01 08:17:24 +00:00
macbishop
00f07eb977 Use ArgTraits instead of ValueExtractor specialization Bug 1711487 2007-06-14 21:02:01 +00:00
mes5k
37c112ddab changed the blankChar to the bell character instead of * 2007-04-21 05:28:42 +00:00
mes5k
14d1dc69bf added gcc warning patch 2005-09-10 23:25:43 +00:00
mes5k
d46a014716 updated docbook output 2005-02-03 23:04:35 +00:00
mes5k
10f0b3c1e8 removed value required 2005-01-24 03:14:47 +00:00
mes5k
ee4e8d9783 fixed xor bug 2005-01-21 04:03:20 +00:00
macbishop
505936eb05 Removed check on description in Arg::operator== since multiple args should be able to have the same description. 2005-01-17 20:48:52 +00:00
mes5k
c35e842ddc fixed a bug involving blank _flags and - as an UnlabeledValueArg 2004-12-08 02:16:54 +00:00
mes5k
e02172004f cleaned up iterator names 2004-12-01 03:11:25 +00:00
mes5k
6f2d4828a8 changed output around 2004-11-05 05:07:12 +00:00
mes5k
706f0b28b7 made processArg pure virtual 2004-10-14 17:19:27 +00:00
mes5k
babf6baac6 added new Exception classes 2004-09-27 21:30:57 +00:00
mes5k
ad7f3fdab3 minor formatting 2004-09-26 23:54:16 +00:00
macbishop
35aa53232d Moving the implementation of tclap to the header files presented me with two
major problems. 1) There where static functions and variables that could cause
link errors if tclap where used in different files (e.g. file1.cc and file2.cc
included tclap then compiling both files would give hard symbols for some
variables which would produce multiple definition when linking) 2) The
dependencies of tclap was a bit strange (CmdLine depends on Args and Args
depends on CmdLine for instance)

The first problem I solved by removing all static variables putting them in
static member functions (which are weak-symbols). So for instance every where
there previously was something like x = _delimiter there now is x = delimiter()
or in case of write acces delimiterRef() = x instead of _delimiter = x (I had
to append the Ref because there where already functions with the same name as
the variables). To solve the problem with static functions I simply inlined
them. This causes the compiler to produce a weak symbol or inline if
appropriate. We can put the functions inside the class declaration later to
make the code look better. This worked fine in all but two cases. In the
ValueArg and MultiArg classes I had to do a "hack" to work around the
specialization template for extractValue<std::string>. The code for this is
very simple but it might look strange an stupid at first but it is only to
resolve the specialisation to a weak symbol. What I did was I put the
implementations of extractValue in a helper class and I could then create a
specialized class instead of function and everything worked out. I think now in
retrospect there might be better solutions to this but I'll think a bit more on
it (maybe some type of inlining on the specialized version would suffice but
I'm not sure).

To handle the dependencies I had to do some rewriting. The first step was to
introduce a new class CmdLineInterface that is a purely abstract base of
CmdLine that specifies the functions needed by Arg and friends. Thus Arg
classes now takes an CmdLineInterface object as input instead (however only
CmdLine can ever be instantiated of-course). With this extra class cleaning up
the dependencies was quite simple, I've attached a dependency graph to the mail
(depgraph.png). I also cleaned up the #includes so now only what actually needs
inclusion is included. A nice side effect of this is that the impl. of CmdLine
is now put back into CmdLine.h (where I guess you wanted it) which (recursivly)
includes everything else needed.

Just to make things clear for myself regarding the class dependencies I made a
class TCLAP::Exception that inherits from std::exception and is a base of
ArgException (Exception does nothing currently). If we don't want the Exception
class it can be removed, however I think it could be a nice logic to have a
base Exception class that every exception inherits from, but we can discuss
that when we decide how to handle exceptions.
2004-09-26 18:27:47 +00:00
mes5k
6cd0c3db78 changed ifndef labels 2004-09-18 16:54:21 +00:00
macbishop
4ae30a9aa5 Had to make ~Arg() public because it won't be possible to delete Arg*s if it is not, and we want that (I think). 2004-09-18 14:53:47 +00:00
mes5k
67c8ff84e1 cleaned up a bunch of things 2004-09-16 03:54:08 +00:00
mes5k
389a4f87b1 got CmdLine arg working 2004-09-12 02:32:37 +00:00
macbishop
35a072e0b6 Support for automatic addition to a CmdLine parser 2004-09-09 19:55:33 +00:00
mes5k
a01538d7ba changed namespace std handling 2004-09-07 18:24:48 +00:00
mes5k
fc56674402 made isReq virtual 2004-07-04 02:31:35 +00:00
mes5k
c17ad76595 now the Arg adds itself to the CmdLine arglist 2004-02-13 23:21:38 +00:00
mes5k
b8c1dbf97c added new var 2004-02-10 03:56:05 +00:00
mes5k
59b98dd182 xor stuff 2004-02-04 03:20:00 +00:00
mes5k
377f9384fa fixed combined switch stuff and added doxygen comments 2004-01-08 04:59:26 +00:00
mes5k
bbbadfddc9 delimiter changes 2003-12-22 01:48:53 +00:00
mes5k
aca51c23a8 big update 2003-04-03 17:59:34 +00:00
mes5k
ea987fad7a Initial revision 2003-03-19 02:39:58 +00:00