Daniel James | 30 Apr 23:26
Picon
Favicon

Generating slightly better filenames

I'm trying to improve the filenames created by boostbook. In the
xpressive documentation there's a file (http://tinyurl.com/436vx4)
with the impressive filename:

result_This(Cont,It,Value),typename disable_if_ mpl__or__ is_integral_
UNCVREF(It)_,is_same_ UNCVREF(It),UNCVREF(Value)_ _
___type__id1001524.html

The attached patch generates the slightly improved:

result_This(Cont,It,Value),typename_disable_if_mpl_or_is_integral_UNCVREF(It)_,is_same_UNCVREF(It),UNCVREF(Value)_type_id2392301.html

Spaces are converted to underscores, and consecutive underscores are
replaced with single underscores. It's a bit of a hack but it seems to
work okay.

I'll try to make further improvements at some point - such as not
including the 'typename' and truncating long type names like this but
that will require a better understanding of the xsl so I probably
won't get round to it for a while.

If there's a 1.35.1, I'll probably try to include something like this.

Daniel
Attachment (filenames.patch): application/octet-stream, 755 bytes
_______________________________________________
Boost-docs mailing list
Boost-docs <at> lists.boost.org
(Continue reading)

Daniel James | 9 May 00:21
Picon
Favicon

Re: Generating slightly better filenames

On 30/04/2008, Daniel James <daniel_james <at> fmail.co.uk> wrote:
[snip]
>
>  Spaces are converted to underscores, and consecutive underscores are
>  replaced with single underscores. It's a bit of a hack but it seems to
>  work okay.

I've merged this into trunk now.

>  I'll try to make further improvements at some point - such as not
>  including the 'typename' and truncating long type names like this but
>  that will require a better understanding of the xsl so I probably
>  won't get round to it for a while.

It turns out that supporting variadic template parameters in template
specializations needs some improvements here, so I've made a few
changes in the doc branch:

1. There are actually two different templates for generating ids for
functions, so I combined them. The new version uses the function name
if it's unique, otherwise it generates the id and adds the unique
numeric id on the end.

http://svn.boost.org/trac/boost/changeset/45130

2. I changed the id generating templates, so that instead of calling
'fully-qualified-name' they call a new template 'fully-qualified-id'.
This will make it easier to make changes to the generated ids. For a
start it replaces dots that aren't seperators with underscores - this
is needed for template packs. The exisiting code converts the three
(Continue reading)


Gmane