|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-16 02:43:06
Hi Leo,
> Have you also given any consideration to how the descriptions wrap around
> if they are too long? For long descriptions, they can be quite ugly if
> left as is.
No. Frankly, I left that out.
> At the moment, I output the description to a stringstream and wrap
> and indent everything post factum using the ": " in the output (I supply
> an optional line length for wrapping). This is fine and
> produces really nice output including embedded \n in the description text,
> but I wouldn't mind a more general solution.
I recall somebody mentioned existing code for proper line wrapping. Anybody
knows where it is? And even if my memory has failed me and no such code is
readily available, I think if you sent your code I can try integrating it
with the library.
> A minor nit pick, with option groups (chained options_description), the
> colons for the same group align but not across groups.
I agree that this can be improved upon. Noted.
> Perhaps it might be possible to also dump the various fields of the output
> to some vector or even a templated callback object for greater flexibility
> of output.
Some previous version used boost::function callback for formatting, but I
quickly dropped that because I don't really know who usefull is it, and
what's the best interface is.
- Volodya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk