mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 15:03:57 +00:00
Added support for new boostbook <access> element for documenting non-public
class members. function.xsl, type.xsl, utility.xsl: Added support for <access> elements to allow nonpublic access specifiers for class member documentation. boostbook.dtd: Updated to reflect new <access> element. Updated Peter Simons email address. Added mention of boost license. reference.dtdxml: Added reference documentation for new <access> element. Removed some obsolete remarks from the description of inherit element. reference.xml: The changes to this file were generated by applying dtd2boostbook.xsl to the updated reference.dtdxml file. [SVN r40555]
This commit is contained in:
parent
ba2b0af02c
commit
677773ea5b
@ -22,13 +22,9 @@
|
||||
type="param"
|
||||
>
|
||||
<text-expanded>template?, inherit*, purpose?, description?,
|
||||
(static-constant|typedef|enum|
|
||||
copy-assignment|constructor|destructor|method-group|
|
||||
free-function-group|function|method|overloaded-function|
|
||||
overloaded-method|data-member|class|class-specialization|struct|
|
||||
struct-specialization|union|union-specialization)*</text-expanded>
|
||||
(access|%boost.class.mix;)*</text-expanded>
|
||||
<text>template?, inherit*, purpose?, description?,
|
||||
(%boost.class.mix;)*</text>
|
||||
(access|%boost.class.mix;)*</text>
|
||||
</entity>
|
||||
|
||||
<entity name="boost.function.semantics"
|
||||
@ -98,21 +94,26 @@
|
||||
id CDATA #IMPLIED</text>
|
||||
</entity>
|
||||
|
||||
<entity name="boost.class.mix"
|
||||
<entity name="boost.class.members"
|
||||
type="param"
|
||||
>
|
||||
<text-expanded>static-constant|typedef|enum|
|
||||
copy-assignment|constructor|destructor|method-group|
|
||||
free-function-group|function|method|overloaded-function|
|
||||
overloaded-method|data-member|class|class-specialization|struct|
|
||||
method|overloaded-method|data-member|class|class-specialization|struct|
|
||||
struct-specialization|union|union-specialization</text-expanded>
|
||||
<text>static-constant|typedef|enum|
|
||||
copy-assignment|constructor|destructor|method-group|
|
||||
free-function-group|function|method|overloaded-function|
|
||||
overloaded-method|data-member|class|class-specialization|struct|
|
||||
|method|overloaded-method|data-member|class|class-specialization|struct|
|
||||
struct-specialization|union|union-specialization</text>
|
||||
</entity>
|
||||
|
||||
<entity name="boost.class.mix"
|
||||
type="param"
|
||||
>
|
||||
<text-expanded>free-function-group|function|overloaded-function|%boost.class.members;</text-expanded>
|
||||
<text>free-function-group|function|overloaded-function|%boost.class.members;</text>
|
||||
</entity>
|
||||
|
||||
<entity name="boost.testsuite.tests"
|
||||
type="param"
|
||||
>
|
||||
@ -197,13 +198,9 @@
|
||||
type="param"
|
||||
>
|
||||
<text-expanded>template?, specialization?, inherit?, purpose?, description?,
|
||||
(static-constant|typedef|enum|
|
||||
copy-assignment|constructor|destructor|method-group|
|
||||
free-function-group|function|method|overloaded-function|
|
||||
overloaded-method|data-member|class|class-specialization|struct|
|
||||
struct-specialization|union|union-specialization)*</text-expanded>
|
||||
(access|%boost.class.mix;)*</text-expanded>
|
||||
<text>template?, specialization?, inherit?, purpose?, description?,
|
||||
(%boost.class.mix;)*</text>
|
||||
(access|%boost.class.mix;)*</text>
|
||||
</entity>
|
||||
|
||||
<entity name="library.content"
|
||||
@ -223,6 +220,7 @@
|
||||
<element-name name="purpose" occurrence="?"/>
|
||||
<element-name name="description" occurrence="?"/>
|
||||
<or-group occurrence="*">
|
||||
<element-name name="access"/>
|
||||
<element-name name="static-constant"/>
|
||||
<element-name name="typedef"/>
|
||||
<element-name name="enum"/>
|
||||
@ -750,6 +748,7 @@
|
||||
<element-name name="purpose" occurrence="?"/>
|
||||
<element-name name="description" occurrence="?"/>
|
||||
<or-group occurrence="*">
|
||||
<element-name name="access"/>
|
||||
<element-name name="static-constant"/>
|
||||
<element-name name="typedef"/>
|
||||
<element-name name="enum"/>
|
||||
@ -819,10 +818,7 @@
|
||||
<purpose>Declares a base class of the enclosing class or struct</purpose>
|
||||
|
||||
<description>
|
||||
<para>This element contains the name of the class inherited. The
|
||||
content model is free-form, as the inherited class may be an
|
||||
instantiation of a template and may have markup in it (e.g.,
|
||||
<sgmltag>classname</sgmltag> tags).</para>
|
||||
<para>This element contains the type of the class inherited.</para>
|
||||
</description>
|
||||
</element>
|
||||
|
||||
@ -837,7 +833,9 @@
|
||||
<attribute name="access"
|
||||
type="#REQUIRED"
|
||||
value="CDATA"
|
||||
default=""/>
|
||||
default="">
|
||||
<purpose>The access specifier ("public", "private", or "protected") of the inheritance.</purpose>
|
||||
</attribute>
|
||||
<attribute name="id"
|
||||
type="#IMPLIED"
|
||||
value="CDATA"
|
||||
@ -1558,6 +1556,7 @@
|
||||
<element-name name="purpose" occurrence="?"/>
|
||||
<element-name name="description" occurrence="?"/>
|
||||
<or-group occurrence="*">
|
||||
<element-name name="access"/>
|
||||
<element-name name="static-constant"/>
|
||||
<element-name name="typedef"/>
|
||||
<element-name name="enum"/>
|
||||
@ -2276,6 +2275,60 @@
|
||||
default=""/>
|
||||
</attlist>
|
||||
|
||||
<element name="access"
|
||||
content-type="element">
|
||||
<content-model-expanded>
|
||||
<or-group occurrence="+">
|
||||
<element-name name="static-constant"/>
|
||||
<element-name name="typedef"/>
|
||||
<element-name name="enum"/>
|
||||
<element-name name="copy-assignment"/>
|
||||
<element-name name="constructor"/>
|
||||
<element-name name="destructor"/>
|
||||
<element-name name="method-group"/>
|
||||
<element-name name="method"/>
|
||||
<element-name name="overloaded-method"/>
|
||||
<element-name name="data-member"/>
|
||||
<element-name name="class"/>
|
||||
<element-name name="class-specialization"/>
|
||||
<element-name name="struct"/>
|
||||
<element-name name="struct-specialization"/>
|
||||
<element-name name="union"/>
|
||||
<element-name name="union-specialization"/>
|
||||
</or-group>
|
||||
</content-model-expanded>
|
||||
<content-model>
|
||||
<sequence-group occurrence="+">
|
||||
<parament-name name="boost.class.members"/>
|
||||
</sequence-group>
|
||||
</content-model>
|
||||
<purpose>Declares an access specification for class members</purpose>
|
||||
|
||||
<description>
|
||||
<para>The access specifications of class members (public, private, or protected) may be determined by enclosing them in an <access> element.</para>
|
||||
</description>
|
||||
</element>
|
||||
|
||||
<attlist name="access">
|
||||
<attdecl>
|
||||
name CDATA #REQUIRED
|
||||
%boost.common.attrib;</attdecl>
|
||||
<attribute name="last-revision"
|
||||
type="#IMPLIED"
|
||||
value="CDATA"
|
||||
default=""/>
|
||||
<attribute name="name"
|
||||
type="#REQUIRED"
|
||||
value="CDATA"
|
||||
default="">
|
||||
<purpose>The name of the access specification, e.g. "public", "private", or "protected".</purpose>
|
||||
</attribute>
|
||||
<attribute name="id"
|
||||
type="#IMPLIED"
|
||||
value="CDATA"
|
||||
default=""/>
|
||||
</attlist>
|
||||
|
||||
<element name="class"
|
||||
content-type="element">
|
||||
<content-model-expanded>
|
||||
@ -2285,6 +2338,7 @@
|
||||
<element-name name="purpose" occurrence="?"/>
|
||||
<element-name name="description" occurrence="?"/>
|
||||
<or-group occurrence="*">
|
||||
<element-name name="access"/>
|
||||
<element-name name="static-constant"/>
|
||||
<element-name name="typedef"/>
|
||||
<element-name name="enum"/>
|
||||
@ -2813,6 +2867,7 @@
|
||||
<element-name name="purpose" occurrence="?"/>
|
||||
<element-name name="description" occurrence="?"/>
|
||||
<or-group occurrence="*">
|
||||
<element-name name="access"/>
|
||||
<element-name name="static-constant"/>
|
||||
<element-name name="typedef"/>
|
||||
<element-name name="enum"/>
|
||||
@ -2874,6 +2929,7 @@
|
||||
<element-name name="purpose" occurrence="?"/>
|
||||
<element-name name="description" occurrence="?"/>
|
||||
<or-group occurrence="*">
|
||||
<element-name name="access"/>
|
||||
<element-name name="static-constant"/>
|
||||
<element-name name="typedef"/>
|
||||
<element-name name="enum"/>
|
||||
@ -3224,5 +3280,4 @@
|
||||
value="CDATA"
|
||||
default=""/>
|
||||
</attlist>
|
||||
|
||||
</dtd>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,15 +1,20 @@
|
||||
<!--
|
||||
BoostBook DTD version 1.0
|
||||
BoostBook DTD version 1.1
|
||||
|
||||
For further information, see: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Boost_Documentation_Format
|
||||
|
||||
Copyright (c) 2002 by Peter Simons <simons@computer.org>.
|
||||
All Rights Reserved.
|
||||
Copyright (c) 2002 by Peter Simons <simons@cryp.to>
|
||||
Copyright (c) 2003-2004 by Douglas Gregor <doug.gregor -at- gmail.com>
|
||||
Copyright (c) 2007 by Frank Mori Hess <fmhess@users.sourceforge.net>
|
||||
|
||||
Distributed under 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)
|
||||
|
||||
This DTD module is identified by the PUBLIC and SYSTEM identifiers:
|
||||
|
||||
PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||
SYSTEM "http://cryp.to/boost-sandbox/libs/documentation/dtd/boostbook.dtd"
|
||||
PUBLIC "-//Boost//DTD BoostBook XML V1.1//EN"
|
||||
SYSTEM "http://www.boost.org/tools/boostbook/dtd/1.1/boostbook.dtd"
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
@ -46,20 +51,22 @@
|
||||
<!ENTITY % boost.template.mix
|
||||
"template-type-parameter|template-nontype-parameter|template-varargs">
|
||||
|
||||
<!ENTITY % boost.class.mix
|
||||
<!ENTITY % boost.class.members
|
||||
"static-constant|typedef|enum|
|
||||
copy-assignment|constructor|destructor|method-group|
|
||||
free-function-group|function|method|overloaded-function|
|
||||
overloaded-method|data-member|class|class-specialization|struct|
|
||||
method|overloaded-method|data-member|class|class-specialization|struct|
|
||||
struct-specialization|union|union-specialization">
|
||||
|
||||
<!ENTITY % boost.class.mix
|
||||
"%boost.class.members;|free-function-group|function|overloaded-function">
|
||||
|
||||
<!ENTITY % boost.class.content
|
||||
"template?, inherit*, purpose?, description?,
|
||||
(%boost.class.mix;)*">
|
||||
(%boost.class.mix;|access)*">
|
||||
|
||||
<!ENTITY % boost.class-specialization.content
|
||||
"template?, specialization?, inherit?, purpose?, description?,
|
||||
(%boost.class.mix;)*">
|
||||
(%boost.class.mix;|access)*">
|
||||
|
||||
<!ENTITY % boost.function.semantics
|
||||
"purpose?, description?, requires?, effects?, postconditions?,
|
||||
@ -148,6 +155,11 @@
|
||||
name CDATA #REQUIRED
|
||||
%boost.common.attrib;>
|
||||
|
||||
<!ELEMENT access (%boost.class.members;)+>
|
||||
<!ATTLIST access
|
||||
name CDATA #REQUIRED
|
||||
%boost.common.attrib;>
|
||||
|
||||
<!--========= C++ Templates =========-->
|
||||
<!ELEMENT template (%boost.template.mix;)*>
|
||||
<!ATTLIST template %boost.common.attrib;>
|
||||
|
@ -634,8 +634,12 @@
|
||||
<xsl:with-param name="text" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="monospaced">
|
||||
<xsl:with-param name="text" select="@name"/>
|
||||
<xsl:with-param name="text">
|
||||
<xsl:call-template name="object-name"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="access-name"/>
|
||||
<xsl:text> construct/copy/destruct</xsl:text>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="text">
|
||||
@ -658,7 +662,9 @@
|
||||
<xsl:call-template name="function">
|
||||
<xsl:with-param name="indentation" select="0"/>
|
||||
<xsl:with-param name="is-reference" select="true()"/>
|
||||
<xsl:with-param name="constructor-for" select="../@name"/>
|
||||
<xsl:with-param name="constructor-for">
|
||||
<xsl:call-template name="object-name"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="standalone" select="true()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
@ -678,7 +684,9 @@
|
||||
<xsl:call-template name="function">
|
||||
<xsl:with-param name="indentation" select="0"/>
|
||||
<xsl:with-param name="is-reference" select="true()"/>
|
||||
<xsl:with-param name="copy-assign-for" select="../@name"/>
|
||||
<xsl:with-param name="copy-assign-for">
|
||||
<xsl:call-template name="object-name"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="standalone" select="true()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
@ -698,7 +706,9 @@
|
||||
<xsl:call-template name="function">
|
||||
<xsl:with-param name="indentation" select="0"/>
|
||||
<xsl:with-param name="is-reference" select="true()"/>
|
||||
<xsl:with-param name="destructor-for" select="../@name"/>
|
||||
<xsl:with-param name="destructor-for">
|
||||
<xsl:call-template name="object-name"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="standalone" select="true()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
@ -1044,7 +1054,9 @@
|
||||
<xsl:with-param name="text" select="''"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="monospaced">
|
||||
<xsl:with-param name="text" select="../@name"/>
|
||||
<xsl:with-param name="text">
|
||||
<xsl:call-template name="object-name"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
|
251
xsl/type.xsl
251
xsl/type.xsl
@ -659,7 +659,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
<xsl:with-param name="context" select="../@name"/>
|
||||
<xsl:with-param name="is-reference" select="false()"/>
|
||||
<xsl:with-param name="constructor-for" select="../@name"/>
|
||||
<xsl:with-param name="constructor-for">
|
||||
<xsl:call-template name="object-name"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
@ -669,7 +671,9 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
<xsl:with-param name="context" select="../@name"/>
|
||||
<xsl:with-param name="is-reference" select="false()"/>
|
||||
<xsl:with-param name="copy-assign-for" select="../@name"/>
|
||||
<xsl:with-param name="copy-assign-for">
|
||||
<xsl:call-template name="object-name"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
@ -679,90 +683,15 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
<xsl:with-param name="context" select="../@name"/>
|
||||
<xsl:with-param name="is-reference" select="false()"/>
|
||||
<xsl:with-param name="destructor-for" select="../@name"/>
|
||||
<xsl:with-param name="destructor-for">
|
||||
<xsl:call-template name="object-name"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="class-type-synopsis">
|
||||
<xsl:template name="class-members-synopsis">
|
||||
<xsl:param name="indentation" select="0"/>
|
||||
|
||||
<!-- The keyword used to declare this class type, e.g., class,
|
||||
struct, or union. -->
|
||||
<xsl:variable name="class-key">
|
||||
<xsl:call-template name="type.class.key"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="ancestor::class|ancestor::class-specialization|
|
||||
ancestor::struct|ancestor::struct-specialization|
|
||||
ancestor::union|ancestor::union-specialization">
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<!-- If this nested class has a "purpose" element, use it as a
|
||||
comment. -->
|
||||
<xsl:if test="purpose">
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="highlight-comment">
|
||||
<xsl:with-param name="text">
|
||||
<xsl:text>// </xsl:text>
|
||||
<xsl:apply-templates select="purpose" mode="comment"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Template header -->
|
||||
<xsl:if test="template">
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates select="template" mode="reference">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<!-- Class name -->
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="highlight-keyword">
|
||||
<xsl:with-param name="keyword" select="$class-key"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:apply-templates select="specialization"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="inherit">
|
||||
<!-- Base class list (with opening brace) -->
|
||||
<xsl:call-template name="print.base.classes">
|
||||
<xsl:with-param name="indentation"
|
||||
select="string-length($class-key) + string-length(@name)
|
||||
+ $indentation + 1"/>
|
||||
<xsl:with-param name="base-indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- Opening brace -->
|
||||
<xsl:text> {</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!-- Public designator -->
|
||||
<xsl:if test="contains(local-name(.), 'class')">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="highlight-keyword">
|
||||
<xsl:with-param name="keyword" select="'public'"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>:</xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Typedefs -->
|
||||
<xsl:if test="typedef">
|
||||
<xsl:text> </xsl:text>
|
||||
@ -836,6 +765,121 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
<xsl:apply-templates select="data-member" mode="synopsis">
|
||||
<xsl:with-param name="indentation" select="$indentation + 2"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="print-access-specification">
|
||||
<xsl:param name="indentation" select="0"/>
|
||||
<xsl:param name="specification" select="'public'"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="highlight-keyword">
|
||||
<xsl:with-param name="keyword" select="$specification"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>:</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="access" mode="synopsis">
|
||||
<xsl:param name="indentation" select="0"/>
|
||||
<xsl:call-template name="print-access-specification">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
<xsl:with-param name="specification" select="@name"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="class-members-synopsis">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="class-type-synopsis">
|
||||
<xsl:param name="indentation" select="0"/>
|
||||
|
||||
<!-- The keyword used to declare this class type, e.g., class,
|
||||
struct, or union. -->
|
||||
<xsl:variable name="class-key">
|
||||
<xsl:call-template name="type.class.key"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="ancestor::class|ancestor::class-specialization|
|
||||
ancestor::struct|ancestor::struct-specialization|
|
||||
ancestor::union|ancestor::union-specialization">
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<!-- If this nested class has a "purpose" element, use it as a
|
||||
comment. -->
|
||||
<xsl:if test="purpose">
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="highlight-comment">
|
||||
<xsl:with-param name="text">
|
||||
<xsl:text>// </xsl:text>
|
||||
<xsl:apply-templates select="purpose" mode="comment"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Template header -->
|
||||
<xsl:if test="template">
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates select="template" mode="reference">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<!-- Class name -->
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="highlight-keyword">
|
||||
<xsl:with-param name="keyword" select="$class-key"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:apply-templates select="specialization"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="inherit">
|
||||
<!-- Base class list (with opening brace) -->
|
||||
<xsl:call-template name="print.base.classes">
|
||||
<xsl:with-param name="indentation"
|
||||
select="string-length($class-key) + string-length(@name)
|
||||
+ $indentation + 1"/>
|
||||
<xsl:with-param name="base-indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- Opening brace -->
|
||||
<xsl:text> {</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!-- Default public designator for members not inside explicit <access> elements -->
|
||||
<xsl:if test="contains(local-name(.), 'class')">
|
||||
<xsl:if test="count(static-constant|typedef|enum|
|
||||
copy-assignment|constructor|destructor|method-group|
|
||||
function|method|overloaded-method|data-member|
|
||||
class|class-specialization|
|
||||
struct|struct-specialization|
|
||||
union|union-specialization) > 0">
|
||||
<xsl:call-template name="print-access-specification">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:call-template name="class-members-synopsis">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:apply-templates select="access" mode="synopsis">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:apply-templates>
|
||||
|
||||
<!-- Closing brace -->
|
||||
<xsl:text> </xsl:text>
|
||||
@ -856,6 +900,30 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="class-members-reference">
|
||||
<xsl:call-template name="construct-copy-destruct-reference"/>
|
||||
|
||||
<xsl:apply-templates
|
||||
select="method-group|method|overloaded-method"
|
||||
mode="reference"/>
|
||||
|
||||
<!-- Emit reference docs for nested classes -->
|
||||
<xsl:apply-templates
|
||||
select="class|class-specialization|
|
||||
struct|struct-specialization|
|
||||
union|union-specialization"
|
||||
mode="namespace-reference"/>
|
||||
|
||||
<!-- Emit reference docs for nested enums -->
|
||||
<xsl:apply-templates
|
||||
select="enum"
|
||||
mode="namespace-reference"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="access" mode="namespace-reference">
|
||||
<xsl:call-template name="class-members-reference"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Emit namespace-level class reference documentation -->
|
||||
<xsl:template match="class|class-specialization|
|
||||
struct|struct-specialization|
|
||||
@ -900,25 +968,8 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="description"/>
|
||||
|
||||
<xsl:apply-templates select="typedef" mode="reference"/>
|
||||
|
||||
<xsl:call-template name="construct-copy-destruct-reference"/>
|
||||
|
||||
<xsl:apply-templates
|
||||
select="method-group|method|overloaded-method"
|
||||
mode="reference"/>
|
||||
|
||||
<!-- Emit reference docs for nested classes -->
|
||||
<xsl:apply-templates
|
||||
select="class|class-specialization|
|
||||
struct|struct-specialization|
|
||||
union|union-specialization"
|
||||
mode="namespace-reference"/>
|
||||
|
||||
<!-- Emit reference docs for nested enums -->
|
||||
<xsl:apply-templates
|
||||
select="enum"
|
||||
mode="namespace-reference"/>
|
||||
<xsl:call-template name="class-members-reference"/>
|
||||
<xsl:apply-templates select="access" mode="namespace-reference"/>
|
||||
|
||||
<xsl:apply-templates select="free-function-group" mode="reference">
|
||||
<xsl:with-param name="class" select="@name"/>
|
||||
|
@ -19,4 +19,33 @@
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!-- get name of first ancestor-or-self which is a class, struct or union -->
|
||||
<xsl:template name="object-name">
|
||||
<xsl:value-of select="(ancestor-or-self::class |
|
||||
ancestor-or-self::class-specialization |
|
||||
ancestor-or-self::struct |
|
||||
ancestor-or-self::struct-specialization |
|
||||
ancestor-or-self::union |
|
||||
ancestor-or-self::union-specialization)/@name[last()]"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- get name of access specification that we are inside -->
|
||||
<xsl:template name="access-name">
|
||||
<xsl:variable name="ancestors" select="ancestor-or-self::access |
|
||||
ancestor-or-self::class |
|
||||
ancestor-or-self::class-specialization |
|
||||
ancestor-or-self::struct |
|
||||
ancestor-or-self::struct-specialization |
|
||||
ancestor-or-self::union |
|
||||
ancestor-or-self::union-specialization"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="name($ancestors[last()])='access'">
|
||||
<xsl:value-of select="$ancestors[last()]/@name"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
public
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
Loading…
x
Reference in New Issue
Block a user