Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-10-29 17:34:42


On Tuesday 29 October 2002 03:57 pm, Jeff Garland wrote:
[snip]
> Fact is that
> if we move toward XML those of us with an interest might be able
> to extract XML using Doxygen and transform it into other XML-based
> documentation.

Absolutely.

> > XSLT should have enough string-formatting capability to deal with this,
> > given some arbitrary limit on the number of columns in preformatted text.
> > But don't believe me until I've actually done it :)
>
> Beleive me I won't ;-) However, looking at your XML it looks like
> it might be fairly easy to create something like:
>
> template<typename Signature1,
> typename Allocator1,
> typename Signature2,
> typename Allocator2>
> void operator!=(const function<Signature1, Allocator1>&,
> const function<Signature2, Allocator2>&);

That's fine for the example, but that method would result in some ugly
formatting for short names:

  template<typename T>
  void swap(const T& t1,
            const T& t2);

whereas we would really like:

  template<typename T> void swap(T& t1, T& t2);

I've now finished some more XSLT code to line-wrap function parameters: if the
parameter fits on the line, put it on the line; otherwise, indent to the
position where the parameters started on the first line and emit the
parameter. It's not done for template headers yet, but it will give the same
results as in your example (with long parameter names), but it will give the
nicer version of swap(). I'm currently working on integrating it to get a
full example going.

> Oh and thanks for posting this now. This is something that will
> help me with my little homework assignment from last week :-)

Sure. You can be my guinea pig <g>

        Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk