Use specifiers attribute for virtual and explicit.

[SVN r86279]
This commit is contained in:
Daniel James 2013-10-12 23:54:37 +00:00
parent e20b8195e1
commit a7dd45375d
3 changed files with 22 additions and 20 deletions

View File

@ -14,9 +14,9 @@
<data-member name="static_integer" specifiers="static"><type>int</type></data-member> <data-member name="static_integer" specifiers="static"><type>int</type></data-member>
<data-member name="static_const_integer" specifiers="static"><type>const int</type></data-member> <data-member name="static_const_integer" specifiers="static"><type>const int</type></data-member>
<method-group name="public member functions"> <method-group name="public member functions">
<method name="virtual_method"><type>virtual int</type></method> <method name="virtual_method" specifiers="virtual"><type>int</type></method>
<method name="virtual_abstract_method" cv="= 0"><type>virtual int</type></method> <method name="virtual_abstract_method" cv="= 0" specifiers="virtual"><type>int</type></method>
<method name="virtual_const_method" cv="const"><type>virtual int</type></method> <method name="virtual_const_method" cv="const" specifiers="virtual"><type>int</type></method>
<method name="method_with_default_value"><type>int</type><parameter name=""><paramtype>int</paramtype><default>default_value</default></parameter></method> <method name="method_with_default_value"><type>int</type><parameter name=""><paramtype>int</paramtype><default>default_value</default></parameter></method>
<method name="const_method" cv="const"><type>void</type></method> <method name="const_method" cv="const"><type>void</type></method>
<method name="volatile_method" cv="volatile"><type>void</type></method> <method name="volatile_method" cv="volatile"><type>void</type></method>
@ -30,6 +30,10 @@
</method-group> </method-group>
<constructor cv="= default"><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></constructor> <constructor cv="= default"><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></constructor>
<copy-assignment cv="= delete"><type><classname>example</classname> &amp;</type><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></copy-assignment> <copy-assignment cv="= delete"><type><classname>example</classname> &amp;</type><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></copy-assignment>
<method-group name="public static functions">
<method name="static_method" specifiers="static"><type>int</type></method>
<method name="static_constexpr" cv="constexpr" specifiers="static"><type>int</type></method>
</method-group>
</class><struct name="example_template"><template> </class><struct name="example_template"><template>
<template-type-parameter name="TypeParameter"><purpose><para>A template parameter </para></purpose></template-type-parameter> <template-type-parameter name="TypeParameter"><purpose><para>A template parameter </para></purpose></template-type-parameter>
<template-nontype-parameter name="NonTypeParameter"><type>int</type><purpose><para>This is a non-type template parameter </para></purpose></template-nontype-parameter> <template-nontype-parameter name="NonTypeParameter"><type>int</type><purpose><para>This is a non-type template parameter </para></purpose></template-nontype-parameter>

View File

@ -51,6 +51,9 @@ namespace example
void constexpr_noexcept() constexpr noexcept; void constexpr_noexcept() constexpr noexcept;
static int static_method();
static int static_constexpr() constexpr;
int integer; int integer;
static int static_integer; static int static_integer;
mutable int mutable_integer; mutable int mutable_integer;

View File

@ -1087,15 +1087,24 @@
substring('= 0 ', 1, 999 * (@virt = 'pure-virtual')), substring('= 0 ', 1, 999 * (@virt = 'pure-virtual')),
''))" /> ''))" />
<!-- Specifiers -->
<xsl:variable name="specifiers" select="normalize-space(concat(
substring('explicit ', 1, 999 * (@explicit = 'yes')),
substring('virtual ', 1, 999 * (
@virtual='yes' or @virt='virtual' or @virt='pure-virtual')),
substring('static ', 1, 999 * (@static = 'yes')),
''))" />
<xsl:if test="$cv-qualifiers"> <xsl:if test="$cv-qualifiers">
<xsl:attribute name="cv"> <xsl:attribute name="cv">
<xsl:value-of select="$cv-qualifiers" /> <xsl:value-of select="$cv-qualifiers" />
</xsl:attribute> </xsl:attribute>
</xsl:if> </xsl:if>
<!-- Specifiers --> <xsl:if test="$specifiers">
<xsl:if test="@explicit = 'yes'"> <xsl:attribute name="specifiers">
<xsl:attribute name="specifiers">explicit</xsl:attribute> <xsl:value-of select="$specifiers" />
</xsl:attribute>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
@ -1247,11 +1256,6 @@
<xsl:call-template name="function.attributes"/> <xsl:call-template name="function.attributes"/>
<!-- Return type --> <!-- Return type -->
<xsl:element name="type"> <xsl:element name="type">
<!-- Cheat on virtual and static by dropping them into the type -->
<xsl:if test="@virtual='yes' or @virt='virtual' or @virt='pure-virtual'">
<xsl:text>virtual </xsl:text>
</xsl:if>
<xsl:apply-templates select="type"/> <xsl:apply-templates select="type"/>
</xsl:element> </xsl:element>
@ -1288,15 +1292,6 @@
<!-- Return type --> <!-- Return type -->
<xsl:element name="type"> <xsl:element name="type">
<!-- Cheat on virtual and static by dropping them into the type -->
<xsl:if test="@static='yes'">
<xsl:text>static </xsl:text>
</xsl:if>
<xsl:if test="@virtual='yes' or @virt='virtual' or @virt='pure-virtual'">
<xsl:text>virtual </xsl:text>
</xsl:if>
<xsl:apply-templates select="type"/> <xsl:apply-templates select="type"/>
</xsl:element> </xsl:element>