File: space_optimized.xslt

package info (click to toggle)
boost1.35 1.35.0-5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 203,856 kB
  • ctags: 337,867
  • sloc: cpp: 938,683; xml: 56,847; ansic: 41,589; python: 18,999; sh: 11,566; makefile: 664; perl: 494; yacc: 456; asm: 353; csh: 6
file content (106 lines) | stat: -rw-r--r-- 5,505 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version='1.0' encoding='iso-8859-1'?>
<!--
XSL transformation from the XML files generated by Doxygen into XHTML source
code documentation of the circular_buffer_space_optimized.

Copyright (c) 2007 Jan Gaspar

Use, modification, and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

  <xsl:import href="doxygen2html.xslt"/>

  <xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes" media-type="text/xml"/>

  <xsl:variable name="link-prefix" select="'circular_buffer.html'"/>
  <xsl:variable name="circular_buffer-ref" select="//compound[name='boost::circular_buffer' and @kind='class']/@refid"/>
  <xsl:variable name="circular_buffer-file" select="concat($xmldir, '/', $circular_buffer-ref, '.xml')"/>
  <xsl:variable name="circular_buffer-reimplemented" select="document($circular_buffer-file)/doxygen/compounddef[@id = $circular_buffer-ref and @kind = 'class']//reimplementedby"/>
  <xsl:variable name="standalone-functions" select="document(concat($xmldir, '/namespaceboost.xml'))/doxygen/compounddef/sectiondef[@kind='func']"/>

  <xsl:template name="reference">
    <xsl:variable name="refid" select="$circular_buffer-reimplemented[@refid=current()/@refid and text()!='capacity_type']/../@id"/>
    <xsl:value-of select="concat(substring(concat($link-prefix, '#', $refid), 1 div (string-length($refid) &gt; 0)), substring(concat('#', @refid), 1 div (string-length($refid) = 0)))"/>
  </xsl:template>

  <xsl:template name="template-parameters">
    <xsl:apply-templates select="templateparamlist/param" mode="synopsis">
      <xsl:with-param name="link-prefix" select="$link-prefix"/>
    </xsl:apply-templates>
  </xsl:template>

  <xsl:template name="public-types">
    <xsl:for-each select="sectiondef[@kind='public-type']/memberdef">
      <xsl:if test="string-length(normalize-space(briefdescription)) &gt; 0">
        <xsl:choose>
          <xsl:when test="document($circular_buffer-file)/doxygen/compounddef[@id = $circular_buffer-ref and @kind = 'class']/sectiondef[@kind='public-type']/memberdef[name=current()/name]/briefdescription = briefdescription">
            <xsl:apply-templates select="document($circular_buffer-file)/doxygen/compounddef[@id = $circular_buffer-ref and @kind = 'class']/sectiondef[@kind='public-type']/memberdef[name=current()/name]" mode="synopsis">
              <xsl:with-param name="link-prefix" select="$link-prefix"/>
            </xsl:apply-templates>
          </xsl:when>
          <xsl:otherwise>
            <xsl:apply-templates select="." mode="synopsis"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:if>
    </xsl:for-each>
  </xsl:template>

  <xsl:template name="constructors">
    <xsl:for-each select="sectiondef[@kind='public-func']/memberdef[type = '']">
      <xsl:variable name="briefdescription" select="normalize-space(briefdescription)"/>
      <xsl:if test="string-length($briefdescription) &gt; 0">
        <xsl:apply-templates select="." mode="synopsis"/>
      </xsl:if>
    </xsl:for-each>
  </xsl:template>

  <xsl:template name="member-functions">
    <xsl:variable name="current" select="sectiondef[@kind='public-func']/memberdef[type != '']"/>
    <xsl:for-each select="document($circular_buffer-file)/doxygen/compounddef[@id = $circular_buffer-ref and @kind = 'class']/sectiondef[@kind='public-func']/memberdef[type != '']">
      <xsl:if test="count($current[name=current()/name and string-length(normalize-space(briefdescription)) &gt; 0]) = 0">
        <xsl:apply-templates select="." mode="synopsis">
          <xsl:with-param name="link-prefix" select="$link-prefix"/>
        </xsl:apply-templates>
      </xsl:if>
    </xsl:for-each>
    <xsl:for-each select="$current[string-length(normalize-space(briefdescription)) &gt; 0]">
      <xsl:apply-templates select="." mode="synopsis"/>
    </xsl:for-each>
  </xsl:template>

  <xsl:template name="standalone-functions">
    <xsl:for-each select="$standalone-functions/memberdef[contains(argsstring, 'circular_buffer_space_optimized&lt;')]">
      <xsl:apply-templates select="." mode="synopsis">
        <xsl:with-param name="indent" select="''"/>
        <xsl:with-param name="link-prefix" select="$link-prefix"/>
        <xsl:with-param name="link" select="$standalone-functions/memberdef[contains(argsstring, 'circular_buffer&lt;') and name=current()/name]/@id"/>
      </xsl:apply-templates>
    </xsl:for-each>
  </xsl:template>

  <xsl:template name="template-parameters-details"/>

  <xsl:template name="public-types-details">
    <xsl:apply-templates select="sectiondef[@kind='public-type']/memberdef[not(contains(type, 'circular_buffer&lt;'))]" mode="description"/>
  </xsl:template>

  <xsl:template name="constructors-details">
    <xsl:for-each select="sectiondef[@kind='public-func']/memberdef[type = '' and string-length(normalize-space(briefdescription)) &gt; 0]">
      <xsl:apply-templates select="." mode="description"/>
    </xsl:for-each>
  </xsl:template>

  <xsl:template name="member-functions-details">
    <xsl:for-each select="sectiondef[@kind='public-func']/memberdef[type != '' and string-length(normalize-space(briefdescription)) &gt; 0]">
      <xsl:apply-templates select="." mode="description"/>
    </xsl:for-each>
  </xsl:template>

  <xsl:template name="standalone-functions-details"/>

</xsl:stylesheet>