Date: 2001-03-02 11:08:45
--- In boost_at_y..., <boost_at_y...> wrote:
> This email message is a notification to let you know that
> a file has been uploaded to the Files area of the boost
> File : /Command Line Parsing/getopt.zip
> Uploaded by : williamkempf_at_h...
> Description : A class, cmdline, that allows for flexible parsing
of command line options.
> You can access this file at the URL
This is the command line parser I talked about yesterday. The
main.cpp gives a generic example of how to use it.
The code is not Boostified in any way. It was written adhoc in a
hurry, so the parsing code may have minor bugs (tested fairly
thoroughly, but I'm sure some sneaked through) and is ugly in nature
(may need some optimizing as well). The interface is a strange
hybrid of standard container functionality minus the iterators and
specialized functionality. It may be beneficial to make this a full
blown container, including iterators which would be used instead of
the next() method. However, that leads to some questions about how
to deal with errors during parsing, so I kept it simple in this
I'm sure there are numerous other things that could be improved upon
here, but for the most part this works and is simple to use, so it
should be a good starting point.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk