|
Boost : |
From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2001-05-10 11:51:24
> The programmer needs to specify both denominators denominators seperately.
> Autogenerating the short form would be too much guesswork in my eyes.
Ok, I've done both in the past. Mostly I've let the parser pick the flag
that fits best. i.e.
-ThisOptionIsReallyLong
-ThisOptionIsShorter
-T
-TMedium
foo -T //Ok
foo -TM // Ok
foo -This // Ambiguous flag
foo -ThisOptionIsR //Ok
As in if there is an exact fit, that's the flag selected.
If there is a unique match that's ok too. As opposed to making the
programmer add a "short" form.
This way if you want a short flag, you just add it twice.
-ThisOptionIsReallyLong, "Long form Of Option", Callback
-TOIRL, "Short version of flag", Callback
It simplifies the programmers interface, at the cost of greater processing
to determine the unique flag.
> Should I upload my current version to the vault already, or do more
> boost-specific cleanup first? For example, I'm using POSIX regex
> functions, as
> well as a custom smartpointer.
You should at least include "config.hpp" and make the include defines
"BOOST_...."
And it "depends" as in if you would like comments on your current code, or
like me, would prefer to keep your messes away from public view until you
are more ready. Thick skin is always an asset. On the otherhand wasting a
lot of time "cleaning" only to get a recommendation that removes the need
seems like a lot of work for nothing.
Sometimes its best just to post interface questions and not worry about the
implementation until you have that nailed down. (Witness all the math
constant discussions and revisions.)
i.e. Have you looked at boost/regex? and boost/smart_ptr.hpp?
Yours,
-gary-
gary.powell_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk