• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3* © 2017 and later: Unicode, Inc. and others.
4* License & terms of use: http://www.unicode.org/copyright.html
5-->
6<!-- Copyright (C) 2009-2011, International Business Machines Corporation and others. All Rights Reserved. -->
7<!-- List all cpp public functions generated from the 'index.xml' -->
8<xsl:stylesheet version="1.0"
9	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
10	<xsl:param name="docFolder" />
11
12	<xsl:template match="/">
13		<list>
14			<xsl:variable name="files_node"
15				select="/doxygenindex/compound[@kind='class']/@refid" />
16			<xsl:for-each select="$files_node">
17				<xsl:variable name="file"
18					select="concat($docFolder, '/', . , '.xml')" />
19				<xsl:variable name="funcs_node"
20					select="document($file)/doxygen/compounddef[@prot='public']/sectiondef/memberdef[@prot='public'][@kind='function']" />
21				<xsl:variable name="compoundname"
22					select="document($file)/doxygen/compounddef[@prot='public']/compoundname/text()" />
23				<xsl:for-each select="$funcs_node">
24					<cppfunc>
25						<xsl:copy-of select="@id" />
26						<xsl:attribute name="status"><xsl:value-of
27							select="detaileddescription/para/xrefsect/xreftitle/text()" /></xsl:attribute>
28						<xsl:attribute name="version"><xsl:value-of
29							select="detaileddescription/para/xrefsect/xrefdescription/para/text()" /></xsl:attribute>
30						<xsl:attribute name="prototype"><xsl:value-of
31							select="concat(definition/text(), argsstring/text())" /></xsl:attribute>
32						<xsl:copy-of select="location/@file" />
33						<xsl:copy-of select="@static" />
34						<xsl:copy-of select="@inline" />
35					</cppfunc>
36				</xsl:for-each>
37
38				<!--  now const static publics -->
39				<xsl:variable name="sconst_node"
40					select="document($file)/doxygen/compounddef[@prot='public']/sectiondef/memberdef[@prot='public'][@kind='variable'][@static='yes']" />
41				<xsl:for-each select="$sconst_node">
42					<cppfunc>
43						<xsl:copy-of select="@id" />
44						<xsl:attribute name="status"><xsl:value-of
45							select="detaileddescription/para/xrefsect/xreftitle/text()" /></xsl:attribute>
46						<xsl:attribute name="version"><xsl:value-of
47							select="detaileddescription/para/xrefsect/xrefdescription/para/text()" /></xsl:attribute>
48						<xsl:attribute name="prototype">static <xsl:value-of
49							select="definition/text()" /></xsl:attribute>
50						<xsl:copy-of select="location/@file" />
51						<xsl:copy-of select="@static" />
52						<xsl:copy-of select="@inline" />
53					</cppfunc>
54				</xsl:for-each>
55
56		<!--
57				//No real non-static variables - and also, doxygen is confused about nested structs/unions
58
59				<xsl:variable name="const_node"
60					select="document($file)/doxygen/compounddef[@prot='public']/sectiondef/memberdef[@prot='public'][@kind='variable'][@static='no']" />
61				<xsl:for-each select="$const_node">
62					<cppfunc>
63						<xsl:copy-of select="@id" />
64						<xsl:attribute name="status"><xsl:value-of
65							select="detaileddescription/para/xrefsect/xreftitle/text()" /></xsl:attribute>
66						<xsl:attribute name="version"><xsl:value-of
67							select="detaileddescription/para/xrefsect/xrefdescription/para/text()" /></xsl:attribute>
68						<xsl:attribute name="prototype">/* not static */ <xsl:value-of
69							select="definition/text()" /></xsl:attribute>
70						<xsl:copy-of select="location/@file" />
71						<xsl:copy-of select="@static" />
72						<xsl:copy-of select="@inline" />
73					</cppfunc>
74				</xsl:for-each>
75		-->
76				<!--  now enums -->
77				<xsl:variable name="enum_node"
78					select="document($file)/doxygen/compounddef[@prot='public']/sectiondef/memberdef[@kind='enum'][@prot='public']" />
79				<xsl:for-each select="$enum_node">
80
81					<!--  use a name, else '(anonymous)' -->
82					<xsl:variable name="enum_node_name"><xsl:choose>
83							<xsl:when test="contains(name/text(), '@')">(anonymous)</xsl:when>
84							<xsl:otherwise><xsl:value-of select="name/text()" /></xsl:otherwise>
85						</xsl:choose></xsl:variable>
86
87					<xsl:variable name="enum_status" select="detaileddescription/para/xrefsect/xreftitle/text()"/>
88					<xsl:variable name="enum_version" select="detaileddescription/para/xrefsect/xrefdescription/para/text()"/>
89
90					<cppfunc>
91						<xsl:copy-of select="@id" />
92						<xsl:attribute name="status"><xsl:value-of
93							select="$enum_status" /></xsl:attribute>
94						<xsl:attribute name="version"><xsl:value-of
95							select="$enum_version" /></xsl:attribute>
96						<xsl:attribute name="prototype">enum
97							<xsl:value-of select="$compoundname"/>::<xsl:value-of
98							select="$enum_node_name" /> {}</xsl:attribute>
99						<xsl:copy-of select="location/@file" />
100					</cppfunc>
101
102					<xsl:variable name="enum_node_file" select="location/@file" />
103
104
105					<xsl:variable name="enum_member" select="enumvalue[@prot='public']"/>
106
107					<!--  for each member -->
108					<xsl:for-each select="$enum_member">
109						<cppfunc>
110							<xsl:copy-of select="@id" />
111							<!--  status and version: only override if set. -->
112							<xsl:attribute name="status">
113								<xsl:choose>
114									<xsl:when test="detaileddescription/para/xrefsect/xreftitle/text() != ''">
115										<xsl:value-of select="detaileddescription/para/xrefsect/xreftitle/text()"/>
116									</xsl:when>
117									<xsl:otherwise>
118										<xsl:value-of select="$enum_status" />
119									</xsl:otherwise>
120								</xsl:choose>
121							</xsl:attribute>
122							<xsl:attribute name="version">
123								<xsl:choose>
124									<xsl:when test="detaileddescription/para/xrefsect/xrefdescription/para/text() != ''">
125										<xsl:value-of select="detaileddescription/para/xrefsect/xrefdescription/para/text()"/>
126									</xsl:when>
127									<xsl:otherwise>
128										<xsl:value-of select="$enum_version" />
129									</xsl:otherwise>
130								</xsl:choose>
131							</xsl:attribute>
132							<xsl:attribute name="prototype">enum
133							<xsl:value-of select="$compoundname"/>::<xsl:value-of
134								select="$enum_node_name" />::<xsl:value-of
135								select="name/text()" /></xsl:attribute>
136							<xsl:attribute name="file"><xsl:value-of select="$enum_node_file" /></xsl:attribute>
137						</cppfunc>
138
139					</xsl:for-each> <!--  done with enum member -->
140					 
141				</xsl:for-each> <!--  done with enums -->
142
143			</xsl:for-each> <!--  done with file -->
144
145		</list>
146	</xsl:template>
147</xsl:stylesheet>
148
149
150