]> git.proxmox.com Git - ceph.git/blob - ceph/src/Beast/doc/reference.xsl
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / Beast / doc / reference.xsl
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
4 <!--
5 Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6
7 Distributed under the Boost Software License, Version 1.0. (See accompanying
8 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 -->
10
11 <xsl:output method="text"/>
12 <xsl:strip-space elements="*"/>
13 <xsl:preserve-space elements="para"/>
14
15
16 <xsl:variable name="newline">
17 <xsl:text>
18 </xsl:text>
19 </xsl:variable>
20
21 <!--
22 Loop over all top-level documentation elements (i.e. classes, functions,
23 variables and typedefs at namespace scope). The elements are sorted by name.
24 Anything in a "detail" namespace or with "_handler" in the name is skipped.
25 -->
26 <xsl:template match="/doxygen">
27 <xsl:text>[/
28 Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
29
30 Distributed under the Boost Software License, Version 1.0. (See accompanying
31 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
32 ]
33
34 </xsl:text>
35 <xsl:for-each select="
36 compounddef[@kind = 'class' or @kind = 'struct'] |
37 compounddef[@kind = 'namespace']/sectiondef/memberdef">
38 <xsl:sort select="concat((. | ancestor::*)/compoundname, '::', name, ':x')"/>
39 <xsl:sort select="name"/>
40 <xsl:choose>
41 <xsl:when test="@kind='class' or @kind='struct'">
42 <xsl:if test="
43 contains(compoundname, 'beast::') and
44 not(contains(compoundname, 'boost::')) and
45 not(contains(compoundname, '::detail')) and
46 not(contains(compoundname, 'rfc2616')) and
47 not(contains(@prot, 'private'))">
48 <xsl:call-template name="class"/>
49 </xsl:if>
50 </xsl:when>
51 <xsl:otherwise>
52 <xsl:if test="
53 not(contains(ancestor::*/compoundname, '::detail')) and
54 not(contains(compoundname, 'rfc2616'))">
55 <xsl:call-template name="namespace-memberdef"/>
56 </xsl:if>
57 </xsl:otherwise>
58 </xsl:choose>
59 </xsl:for-each>
60 </xsl:template>
61
62 <!--========== Utilities ==========-->
63
64 <!-- 4 spaces used for indentation -->
65 <xsl:variable name="tabspaces">
66 <xsl:text> </xsl:text>
67 </xsl:variable>
68
69 <!-- Indent the current line with count number of tabspaces -->
70 <xsl:template name="indent">
71 <xsl:param name="count"/>
72 <xsl:if test="$count &gt; 0">
73 <xsl:value-of select="$tabspaces"/>
74 <xsl:call-template name="indent">
75 <xsl:with-param name="count" select="$count - 1"/>
76 </xsl:call-template>
77 </xsl:if>
78 </xsl:template>
79
80 <xsl:template name="strip-beast-ns">
81 <xsl:param name="name"/>
82 <xsl:choose>
83 <xsl:when test="contains($name, 'boost::system::is_error_code_enum')">
84 <xsl:value-of select="$name"/>
85 </xsl:when>
86 <xsl:when test="contains($name, 'beast::')">
87 <xsl:value-of select="substring-after($name, 'beast::')"/>
88 </xsl:when>
89 <xsl:when test="$name = 'beast'">
90 <xsl:text></xsl:text>
91 </xsl:when>
92 <xsl:otherwise>
93 <xsl:value-of select="$name"/>
94 </xsl:otherwise>
95 </xsl:choose>
96 </xsl:template>
97
98 <xsl:template name="strip-ns">
99 <xsl:param name="name"/>
100 <xsl:choose>
101 <xsl:when test="contains($name, 'boost::system::is_error_code_enum')">
102 <xsl:value-of select="$name"/>
103 </xsl:when>
104 <xsl:when test="contains($name, '::') and contains($name, '&lt;')">
105 <xsl:choose>
106 <xsl:when test="string-length(substring-before($name, '::')) &lt; string-length(substring-before($name, '&lt;'))">
107 <xsl:call-template name="strip-ns">
108 <xsl:with-param name="name" select="substring-after($name, '::')"/>
109 </xsl:call-template>
110 </xsl:when>
111 <xsl:otherwise>
112 <xsl:value-of select="$name"/>
113 </xsl:otherwise>
114 </xsl:choose>
115 </xsl:when>
116 <xsl:when test="contains($name, '::')">
117 <xsl:call-template name="strip-ns">
118 <xsl:with-param name="name" select="substring-after($name, '::')"/>
119 </xsl:call-template>
120 </xsl:when>
121 <xsl:otherwise>
122 <xsl:value-of select="$name"/>
123 </xsl:otherwise>
124 </xsl:choose>
125 </xsl:template>
126
127 <xsl:template name="cleanup-param">
128 <xsl:param name="name"/>
129 <xsl:variable name="clean">
130 <xsl:value-of select="$name"/>
131 </xsl:variable>
132 <xsl:choose>
133 <xsl:when test="' *' = substring($clean, string-length($clean) - 1)">
134 <xsl:value-of select="substring($clean, 1, string-length($clean) - 2)"/>
135 <xsl:text>*</xsl:text>
136 </xsl:when>
137 <xsl:when test="' &amp;' = substring($clean, string-length($clean) - 1)">
138 <xsl:value-of select="substring($clean, 1, string-length($clean) - 2)"/>
139 <xsl:text>&amp;</xsl:text>
140 </xsl:when>
141 <xsl:when test="' &amp;...' = substring($clean, string-length($clean) - 4)">
142 <xsl:value-of select="substring($clean, 1, string-length($clean) - 5)"/>
143 <xsl:text>&amp;...</xsl:text>
144 </xsl:when>
145 <xsl:when test="' &amp;&amp;' = substring($clean, string-length($clean) - 2)">
146 <xsl:value-of select="substring($clean, 1, string-length($clean) - 3)"/>
147 <xsl:text>&amp;&amp;</xsl:text>
148 </xsl:when>
149 <xsl:when test="' &amp;&amp;...' = substring($clean, string-length($clean) - 5)">
150 <xsl:value-of select="substring($clean, 1, string-length($clean) - 6)"/>
151 <xsl:text>&amp;&amp;...</xsl:text>
152 </xsl:when>
153 <xsl:otherwise>
154 <xsl:value-of select="$clean"/>
155 </xsl:otherwise>
156 </xsl:choose>
157 </xsl:template>
158
159 <xsl:template name="cleanup-type">
160 <xsl:param name="name"/>
161 <xsl:variable name="type">
162 <xsl:choose>
163 <xsl:when test="contains($name, 'BOOST_ASIO_DECL ')">
164 <xsl:value-of select="substring-after($name, 'BOOST_ASIO_DECL ')"/>
165 </xsl:when>
166 <xsl:when test="contains($name, 'BOOST_ASIO_DECL')">
167 <xsl:value-of select="substring-after($name, 'BOOST_ASIO_DECL')"/>
168 </xsl:when>
169 <xsl:when test="$name = 'virtual'"></xsl:when>
170 <xsl:otherwise>
171 <xsl:value-of select="$name"/>
172 </xsl:otherwise>
173 </xsl:choose>
174 </xsl:variable>
175 <xsl:variable name="cleaned">
176 <xsl:choose>
177 <xsl:when test="$type='implementation_defined'">
178 <xsl:text>``['implementation-defined]``</xsl:text>
179 </xsl:when>
180 <xsl:when test="$type='void_or_deduced'">
181 <xsl:text>__void_or_deduced__</xsl:text>
182 </xsl:when>
183 <xsl:otherwise>
184 <xsl:value-of select="$type"/>
185 </xsl:otherwise>
186 </xsl:choose>
187 </xsl:variable>
188 <xsl:call-template name="cleanup-param">
189 <xsl:with-param name="name" select="$cleaned"/>
190 </xsl:call-template>
191 </xsl:template>
192
193 <xsl:template name="make-id">
194 <xsl:param name="name"/>
195 <xsl:choose>
196 <xsl:when test="contains($name, 'boost::system::')">
197 <xsl:call-template name="make-id">
198 <xsl:with-param name="name"
199 select="substring-after($name, 'boost::system::')"/>
200 </xsl:call-template>
201 </xsl:when>
202 <xsl:when test="contains($name, 'boost::asio::error::')">
203 <xsl:call-template name="make-id">
204 <xsl:with-param name="name"
205 select="concat(substring-before($name, 'boost::asio::error::'), substring-after($name, 'boost::asio::error::'))"/>
206 </xsl:call-template>
207 </xsl:when>
208 <xsl:when test="contains($name, '::')">
209 <xsl:call-template name="make-id">
210 <xsl:with-param name="name"
211 select="concat(substring-before($name, '::'), '__', substring-after($name, '::'))"/>
212 </xsl:call-template>
213 </xsl:when>
214 <xsl:when test="substring($name, string-length($name) - 1) = '&lt;&lt;'">
215 <xsl:call-template name="make-id">
216 <xsl:with-param name="name"
217 select="concat(substring-before($name, '&lt;&lt;'), '_ls_')"/>
218 </xsl:call-template>
219 </xsl:when>
220 <xsl:when test="substring($name, string-length($name) - 1) = '&gt;&gt;'">
221 <xsl:call-template name="make-id">
222 <xsl:with-param name="name"
223 select="concat(substring-before($name, '&gt;&gt;'), '_rs_')"/>
224 </xsl:call-template>
225 </xsl:when>
226 <xsl:when test="contains($name, '=')">
227 <xsl:call-template name="make-id">
228 <xsl:with-param name="name"
229 select="concat(substring-before($name, '='), '_eq_', substring-after($name, '='))"/>
230 </xsl:call-template>
231 </xsl:when>
232 <xsl:when test="contains($name, '!')">
233 <xsl:call-template name="make-id">
234 <xsl:with-param name="name"
235 select="concat(substring-before($name, '!'), '_not_', substring-after($name, '!'))"/>
236 </xsl:call-template>
237 </xsl:when>
238 <xsl:when test="contains($name, '-&gt;')">
239 <xsl:call-template name="make-id">
240 <xsl:with-param name="name"
241 select="concat(substring-before($name, '-&gt;'), '_arrow_', substring-after($name, '-&gt;'))"/>
242 </xsl:call-template>
243 </xsl:when>
244 <xsl:when test="contains($name, '&lt;')">
245 <xsl:call-template name="make-id">
246 <xsl:with-param name="name"
247 select="concat(substring-before($name, '&lt;'), '_lt_', substring-after($name, '&lt;'))"/>
248 </xsl:call-template>
249 </xsl:when>
250 <xsl:when test="contains($name, '&gt;')">
251 <xsl:call-template name="make-id">
252 <xsl:with-param name="name"
253 select="concat(substring-before($name, '&gt;'), '_gt_', substring-after($name, '&gt;'))"/>
254 </xsl:call-template>
255 </xsl:when>
256 <xsl:when test="contains($name, '[')">
257 <xsl:call-template name="make-id">
258 <xsl:with-param name="name"
259 select="concat(substring-before($name, '['), '_lb_', substring-after($name, '['))"/>
260 </xsl:call-template>
261 </xsl:when>
262 <xsl:when test="contains($name, ']')">
263 <xsl:call-template name="make-id">
264 <xsl:with-param name="name"
265 select="concat(substring-before($name, ']'), '_rb_', substring-after($name, ']'))"/>
266 </xsl:call-template>
267 </xsl:when>
268 <xsl:when test="contains($name, '(')">
269 <xsl:call-template name="make-id">
270 <xsl:with-param name="name"
271 select="concat(substring-before($name, '('), '_lp_', substring-after($name, '('))"/>
272 </xsl:call-template>
273 </xsl:when>
274 <xsl:when test="contains($name, ')')">
275 <xsl:call-template name="make-id">
276 <xsl:with-param name="name"
277 select="concat(substring-before($name, ')'), '_rp_', substring-after($name, ')'))"/>
278 </xsl:call-template>
279 </xsl:when>
280 <xsl:when test="contains($name, '+')">
281 <xsl:call-template name="make-id">
282 <xsl:with-param name="name"
283 select="concat(substring-before($name, '+'), '_plus_', substring-after($name, '+'))"/>
284 </xsl:call-template>
285 </xsl:when>
286 <xsl:when test="contains($name, '-')">
287 <xsl:call-template name="make-id">
288 <xsl:with-param name="name"
289 select="concat(substring-before($name, '-'), '_minus_', substring-after($name, '-'))"/>
290 </xsl:call-template>
291 </xsl:when>
292 <xsl:when test="contains($name, '*')">
293 <xsl:call-template name="make-id">
294 <xsl:with-param name="name"
295 select="concat(substring-before($name, '*'), '_star_', substring-after($name, '*'))"/>
296 </xsl:call-template>
297 </xsl:when>
298 <xsl:when test="starts-with($name, '~')">
299 <xsl:call-template name="make-id">
300 <xsl:with-param name="name"
301 select="concat(substring-after($name, '~'), '_dtor_')"/>
302 </xsl:call-template>
303 </xsl:when>
304 <xsl:when test="contains($name, ' ')">
305 <xsl:call-template name="make-id">
306 <xsl:with-param name="name"
307 select="concat(substring-before($name, ' '), '_', substring-after($name, ' '))"/>
308 </xsl:call-template>
309 </xsl:when>
310 <xsl:when test="contains($name, 'boost__posix_time__ptime')">
311 <xsl:call-template name="make-id">
312 <xsl:with-param name="name"
313 select="concat(substring-before($name, 'boost__posix_time__ptime'), 'ptime', substring-after($name, 'boost__posix_time__ptime'))"/>
314 </xsl:call-template>
315 </xsl:when>
316 <xsl:otherwise>
317 <xsl:value-of select="$name"/>
318 </xsl:otherwise>
319 </xsl:choose>
320 </xsl:template>
321
322 <!--========== Markup ==========-->
323
324 <xsl:template match="para" mode="markup">
325 <xsl:value-of select="$newline"/>
326 <xsl:apply-templates mode="markup"/>
327 <xsl:value-of select="$newline"/>
328 </xsl:template>
329
330 <xsl:template match="para" mode="markup-nested">
331 <xsl:apply-templates mode="markup-nested"/>
332 </xsl:template>
333
334 <xsl:template match="title" mode="markup">
335 <xsl:variable name="title">
336 <xsl:value-of select="."/>
337 </xsl:variable>
338 <xsl:if test="string-length($title) > 0">
339 <xsl:text>[heading </xsl:text>
340 <xsl:value-of select="."/>
341 <xsl:text>]</xsl:text>
342 </xsl:if>
343 </xsl:template>
344
345 <xsl:template match="ulink" mode="markup">
346 <xsl:text>[@</xsl:text>
347 <xsl:value-of select="@url"/>
348 <xsl:text> </xsl:text>
349 <xsl:value-of select="."/>
350 <xsl:text>]</xsl:text>
351 </xsl:template>
352
353 <xsl:template match="programlisting" mode="markup">
354 <xsl:value-of select="$newline"/>
355 <xsl:value-of select="$newline"/>
356 <xsl:apply-templates mode="codeline"/>
357 <xsl:value-of select="$newline"/>
358 <xsl:value-of select="$newline"/>
359 </xsl:template>
360
361 <xsl:template match="programlisting" mode="markup-nested">
362 <xsl:value-of select="$newline"/>
363 <xsl:text>``</xsl:text>
364 <xsl:value-of select="$newline"/>
365 <xsl:apply-templates mode="codeline"/>
366 <xsl:if test="substring(., string-length(.)) = $newline">
367 <xsl:value-of select="$newline"/>
368 </xsl:if>
369 <xsl:text>``</xsl:text>
370 <xsl:value-of select="$newline"/>
371 </xsl:template>
372
373 <xsl:template match="codeline" mode="codeline">
374 <xsl:if test="string-length(.) &gt; 0">
375 <xsl:text> </xsl:text>
376 </xsl:if>
377 <xsl:apply-templates mode="codeline"/>
378 <xsl:value-of select="$newline"/>
379 </xsl:template>
380
381 <xsl:template match="sp" mode="markup">
382 <xsl:text> </xsl:text>
383 </xsl:template>
384
385 <xsl:template match="sp" mode="markup-nested">
386 <xsl:text> </xsl:text>
387 </xsl:template>
388
389 <xsl:template match="sp" mode="codeline">
390 <xsl:text> </xsl:text>
391 </xsl:template>
392
393 <xsl:template match="linebreak" mode="markup">
394 <xsl:text>&#xd;&#xd;</xsl:text>
395 </xsl:template>
396
397 <xsl:template match="linebreak" mode="markup-nested">
398 <xsl:text>&#xd;&#xd;</xsl:text>
399 </xsl:template>
400
401 <xsl:template match="computeroutput" mode="markup">
402 <xsl:text>`</xsl:text>
403 <xsl:value-of select="."/>
404 <xsl:text>`</xsl:text>
405 </xsl:template>
406
407 <xsl:template match="computeroutput" mode="markup-nested">
408 <xsl:text>`</xsl:text>
409 <xsl:value-of select="."/>
410 <xsl:text>`</xsl:text>
411 </xsl:template>
412
413 <!-- Ensure the list starts on its own line -->
414 <xsl:template match="orderedlist | itemizedlist" mode="markup">
415 <xsl:value-of select="$newline" />
416 <xsl:apply-templates mode="markup"/>
417 <xsl:value-of select="$newline" />
418 </xsl:template>
419
420 <!-- Properly format a list item to ensure proper nesting and styling -->
421 <xsl:template match="listitem" mode="markup">
422 <!-- The first listitem in a group was put on a newline by the
423 rule above, so only indent the later siblings -->
424 <xsl:if test="position() &gt; 1">
425 <xsl:value-of select="$newline" />
426 </xsl:if>
427 <!-- Indent the listitem based on the list nesting level -->
428 <xsl:call-template name="indent">
429 <xsl:with-param name="count" select="count(ancestor::orderedlist | ancestor::itemizedlist )-1" />
430 </xsl:call-template>
431 <xsl:if test="parent::orderedlist">
432 <xsl:text># </xsl:text>
433 </xsl:if>
434 <xsl:if test="parent::itemizedlist">
435 <xsl:text>* </xsl:text>
436 </xsl:if>
437 <!-- Doxygen injects a <para></para> element around the listitem contents
438 so this rule extracts the contents and formats that directly to avoid
439 introducing extra newlines from formating para -->
440 <xsl:apply-templates select="para/node()" mode="markup"/>
441 </xsl:template>
442
443 <xsl:template match="bold" mode="markup">[*<xsl:apply-templates mode="markup"/>]</xsl:template>
444
445 <xsl:template match="emphasis" mode="markup">['<xsl:apply-templates mode="markup"/>]</xsl:template>
446
447 <xsl:template match="parameterlist" mode="markup">
448 <xsl:choose>
449 <xsl:when test="@kind='param'">
450 <xsl:text>[heading Parameters]&#xd;</xsl:text>
451 </xsl:when>
452 <xsl:when test="@kind='exception'">
453 <xsl:text>[heading Exceptions]&#xd;</xsl:text>
454 </xsl:when>
455 </xsl:choose>
456 <xsl:text>[variablelist&#xd;</xsl:text>
457 <xsl:apply-templates mode="markup"/>
458 <xsl:text>]&#xd;</xsl:text>
459 </xsl:template>
460
461 <xsl:template match="parameteritem" mode="markup">
462 <xsl:text> [[</xsl:text>
463 <xsl:value-of select="parameternamelist"/>
464 <xsl:text>][&#xd; </xsl:text>
465 <xsl:apply-templates select="parameterdescription" mode="markup-nested"/>
466 <xsl:text>&#xd; ]]&#xd;</xsl:text>
467 </xsl:template>
468
469 <!-- Table support -->
470 <xsl:template match="table" mode="markup">
471 <xsl:text>&#xd;[table &#xd;</xsl:text>
472 <xsl:apply-templates mode="markup"/>
473 <xsl:text>]&#xd;</xsl:text>
474 </xsl:template>
475
476 <xsl:template match="row" mode="markup">
477 <xsl:text> [</xsl:text>
478 <xsl:apply-templates mode="markup"/>
479 <xsl:text>]&#xd;</xsl:text>
480 </xsl:template>
481
482 <xsl:template match="entry" mode="markup">
483 <xsl:text>[</xsl:text>
484 <xsl:apply-templates select="para/node()" mode="markup"/>
485 <xsl:text>]</xsl:text>
486 </xsl:template>
487
488
489
490 <xsl:template match="simplesect" mode="markup">
491 <xsl:choose>
492 <xsl:when test="@kind='return'">
493 <xsl:text>[heading Return Value]</xsl:text>
494 <xsl:apply-templates mode="markup"/>
495 </xsl:when>
496 <xsl:when test="@kind='see'">
497 <xsl:text>[heading See Also]&#xd;</xsl:text>
498 <xsl:apply-templates mode="markup"/>
499 </xsl:when>
500 <xsl:when test="@kind='note'">
501 <xsl:text>[heading Remarks]&#xd;</xsl:text>
502 <xsl:apply-templates mode="markup"/>
503 </xsl:when>
504 <xsl:when test="@kind='par'">
505 <xsl:if test="not(starts-with(title, 'Concepts:'))">
506 <xsl:apply-templates mode="markup"/>
507 </xsl:if>
508 </xsl:when>
509 <xsl:otherwise>
510 <xsl:apply-templates mode="markup"/>
511 </xsl:otherwise>
512 </xsl:choose>
513 </xsl:template>
514
515
516
517 <xsl:template match="text()" mode="markup">
518 <xsl:variable name="text" select="."/>
519 <xsl:variable name="starts-with-whitespace" select="
520 starts-with($text, ' ') or starts-with($text, $newline)"/>
521 <xsl:variable name="preceding-node-name">
522 <xsl:for-each select="preceding-sibling::*">
523 <xsl:if test="position() = last()">
524 <xsl:value-of select="local-name()"/>
525 </xsl:if>
526 </xsl:for-each>
527 </xsl:variable>
528 <xsl:variable name="after-newline" select="
529 $preceding-node-name = 'programlisting' or
530 $preceding-node-name = 'linebreak'"/>
531 <xsl:choose>
532 <xsl:when test="$starts-with-whitespace and $after-newline">
533 <xsl:call-template name="escape-text">
534 <xsl:with-param name="text">
535 <xsl:call-template name="strip-leading-whitespace">
536 <xsl:with-param name="text" select="$text"/>
537 </xsl:call-template>
538 </xsl:with-param>
539 </xsl:call-template>
540 </xsl:when>
541 <xsl:otherwise>
542 <xsl:call-template name="escape-text">
543 <xsl:with-param name="text" select="$text"/>
544 </xsl:call-template>
545 </xsl:otherwise>
546 </xsl:choose>
547 </xsl:template>
548
549
550 <xsl:template match="text()" mode="markup-nested">
551 <xsl:variable name="text" select="."/>
552 <xsl:variable name="starts-with-whitespace" select="
553 starts-with($text, ' ') or starts-with($text, $newline)"/>
554 <xsl:variable name="preceding-node-name">
555 <xsl:for-each select="preceding-sibling::*">
556 <xsl:if test="position() = last()">
557 <xsl:value-of select="local-name()"/>
558 </xsl:if>
559 </xsl:for-each>
560 </xsl:variable>
561 <xsl:variable name="after-newline" select="
562 $preceding-node-name = 'programlisting' or
563 $preceding-node-name = 'linebreak'"/>
564 <xsl:choose>
565 <xsl:when test="$starts-with-whitespace and $after-newline">
566 <xsl:call-template name="escape-text">
567 <xsl:with-param name="text">
568 <xsl:call-template name="strip-leading-whitespace">
569 <xsl:with-param name="text" select="$text"/>
570 </xsl:call-template>
571 </xsl:with-param>
572 </xsl:call-template>
573 </xsl:when>
574 <xsl:otherwise>
575 <xsl:call-template name="escape-text">
576 <xsl:with-param name="text" select="$text"/>
577 </xsl:call-template>
578 </xsl:otherwise>
579 </xsl:choose>
580 </xsl:template>
581
582
583 <xsl:template name="strip-leading-whitespace">
584 <xsl:param name="text"/>
585 <xsl:choose>
586 <xsl:when test="starts-with($text, ' ')">
587 <xsl:call-template name="strip-leading-whitespace">
588 <xsl:with-param name="text" select="substring($text, 2)"/>
589 </xsl:call-template>
590 </xsl:when>
591 <xsl:when test="starts-with($text, $newline)">
592 <xsl:call-template name="strip-leading-whitespace">
593 <xsl:with-param name="text" select="substring($text, 2)"/>
594 </xsl:call-template>
595 </xsl:when>
596 <xsl:otherwise>
597 <xsl:value-of select="$text"/>
598 </xsl:otherwise>
599 </xsl:choose>
600 </xsl:template>
601
602
603 <xsl:template name="escape-text">
604 <xsl:param name="text"/>
605 <xsl:choose>
606 <xsl:when test="contains($text, '_')">
607 <xsl:value-of select="substring-before($text, '_')"/>
608 <xsl:text>\_</xsl:text>
609 <xsl:call-template name="escape-text">
610 <xsl:with-param name="text" select="substring-after($text, '_')"/>
611 </xsl:call-template>
612 </xsl:when>
613 <xsl:otherwise>
614 <xsl:value-of select="$text"/>
615 </xsl:otherwise>
616 </xsl:choose>
617 </xsl:template>
618
619
620 <xsl:template name="escape-name">
621 <xsl:param name="text"/>
622 <xsl:choose>
623 <xsl:when test="contains($text, '[')">
624 <xsl:value-of select="substring-before($text, '[')"/>
625 <xsl:text>\[</xsl:text>
626 <xsl:call-template name="escape-name">
627 <xsl:with-param name="text" select="substring-after($text, '[')"/>
628 </xsl:call-template>
629 </xsl:when>
630 <xsl:when test="contains($text, ']')">
631 <xsl:value-of select="substring-before($text, ']')"/>
632 <xsl:text>\]</xsl:text>
633 <xsl:call-template name="escape-name">
634 <xsl:with-param name="text" select="substring-after($text, ']')"/>
635 </xsl:call-template>
636 </xsl:when>
637 <xsl:otherwise>
638 <xsl:value-of select="$text"/>
639 </xsl:otherwise>
640 </xsl:choose>
641 </xsl:template>
642
643
644
645 <xsl:template match="ref[@kindref='compound']" mode="markup">
646 <xsl:variable name="name">
647 <xsl:value-of select="."/>
648 </xsl:variable>
649 <xsl:choose>
650 <xsl:when test="contains(@refid, 'beast')">
651 <xsl:variable name="dox-ref-id" select="@refid"/>
652 <xsl:variable name="ref-name">
653 <xsl:call-template name="strip-beast-ns">
654 <xsl:with-param name="name"
655 select="(/doxygen//compounddef[@id=$dox-ref-id])[1]/compoundname"/>
656 </xsl:call-template>
657 </xsl:variable>
658 <xsl:variable name="ref-id">
659 <xsl:call-template name="make-id">
660 <xsl:with-param name="name" select="$ref-name"/>
661 </xsl:call-template>
662 </xsl:variable>
663 <!--<xsl:text>|1|</xsl:text>-->
664 <!--
665 <xsl:text>[role red ref-name='</xsl:text>
666 <xsl:value-of select="$ref-name"/>
667 <xsl:text>'|ref-id='</xsl:text>
668 <xsl:value-of select="$ref-id"/>
669 <xsl:text>']|</xsl:text>
670 -->
671 <xsl:text>[link beast.ref.</xsl:text>
672 <xsl:value-of select="$ref-id"/>
673 <xsl:text> `</xsl:text>
674 <xsl:value-of name="text" select="$ref-name"/>
675 <xsl:text>`]</xsl:text>
676 </xsl:when>
677 <xsl:otherwise>
678 <xsl:text>[role red |1|</xsl:text>
679 <xsl:value-of select="."/>
680 <xsl:text>]</xsl:text>
681 </xsl:otherwise>
682 </xsl:choose>
683 </xsl:template>
684
685 <xsl:template match="ref[@kindref='member']" mode="markup">
686 <xsl:variable name="name">
687 <xsl:value-of select="."/>
688 </xsl:variable>
689 <xsl:variable name="dox-ref-id" select="@refid"/>
690 <xsl:variable name="memberdefs" select="/doxygen//compounddef/sectiondef/memberdef[@id=$dox-ref-id]"/>
691 <xsl:variable name="def-kind" select="($memberdefs)/../../@kind"/>
692 <xsl:variable name="sec-kind" select="($memberdefs)/../@kind"/>
693 <xsl:choose>
694 <xsl:when test="contains(@refid, 'beast') and count($memberdefs) &gt; 0">
695 <xsl:variable name="dox-compound-name" select="($memberdefs)[1]/../../compoundname"/>
696 <xsl:variable name="dox-name" select="($memberdefs)[1]/name"/>
697 <xsl:variable name="ref-name">
698 <xsl:call-template name="strip-beast-ns">
699 <xsl:with-param name="name" select="$dox-compound-name"/>
700 </xsl:call-template>
701 </xsl:variable>
702 <xsl:variable name="ref-id">
703 <xsl:call-template name="make-id">
704 <xsl:with-param name="name" select="$ref-name"/>
705 </xsl:call-template>
706 </xsl:variable>
707 <!--<xsl:text>|2|</xsl:text>-->
708 <!--
709 <xsl:text>[role red def-kind='</xsl:text>
710 <xsl:value-of select="$def-kind"/>
711 <xsl:text>', sec-kind='</xsl:text>
712 <xsl:value-of select="$sec-kind"/>
713 <xsl:text>', ref-id='</xsl:text>
714 <xsl:value-of select="$ref-id"/>
715 <xsl:text>'] </xsl:text>
716 -->
717 <xsl:choose>
718 <xsl:when test="$def-kind = 'namespace'">
719 <xsl:text>[link beast.ref.</xsl:text>
720 <xsl:choose>
721 <xsl:when test="string-length($ref-id) &gt; 0">
722 <xsl:value-of select="concat($ref-id,'__',$dox-name)"/>
723 </xsl:when>
724 <xsl:otherwise>
725 <xsl:value-of select="$dox-name"/>
726 </xsl:otherwise>
727 </xsl:choose>
728 <xsl:text> `</xsl:text>
729 <xsl:value-of name="text" select="$dox-name"/>
730 <xsl:text>`]</xsl:text>
731 </xsl:when>
732 <xsl:when test="$def-kind = 'class' or $def-kind = 'struct'">
733 <xsl:text>[link beast.ref.</xsl:text>
734 <xsl:value-of select="concat($ref-id,'.',$dox-name)"/>
735 <xsl:text> `</xsl:text>
736 <xsl:value-of name="text" select="$name"/>
737 <xsl:text>`]</xsl:text>
738 </xsl:when>
739 <xsl:otherwise>
740 <xsl:text>[role red </xsl:text>
741 <xsl:value-of select="$name"/>
742 <xsl:text>]</xsl:text>
743 </xsl:otherwise>
744 </xsl:choose>
745 </xsl:when>
746 <xsl:otherwise>
747 <xsl:text>[role red </xsl:text>
748 <xsl:value-of select="$name"/>
749 <xsl:text>]</xsl:text>
750 </xsl:otherwise>
751 </xsl:choose>
752 </xsl:template>
753
754 <xsl:template match="ref[@kindref='compound']" mode="markup-nested">
755 <xsl:variable name="name">
756 <xsl:value-of select="."/>
757 </xsl:variable>
758 <xsl:text>[role red |3|</xsl:text>
759 <xsl:value-of select="."/>
760 <xsl:text>]</xsl:text>
761 </xsl:template>
762
763 <xsl:template match="ref[@kindref='member']" mode="markup-nested">
764 <xsl:variable name="name">
765 <xsl:value-of select="."/>
766 </xsl:variable>
767 <xsl:variable name="dox-ref-id" select="@refid"/>
768 <xsl:variable name="memberdefs" select="/doxygen//compounddef/sectiondef/memberdef[@id=$dox-ref-id]"/>
769 <xsl:variable name="def-kind" select="($memberdefs)/../../@kind"/>
770 <xsl:variable name="sec-kind" select="($memberdefs)/../@kind"/>
771 <xsl:choose>
772 <xsl:when test="contains(@refid, 'beast') and count($memberdefs) &gt; 0">
773 <xsl:variable name="dox-compound-name" select="($memberdefs)[1]/../../compoundname"/>
774 <xsl:variable name="dox-name" select="($memberdefs)[1]/name"/>
775 <xsl:variable name="ref-name">
776 <xsl:call-template name="strip-beast-ns">
777 <xsl:with-param name="name" select="$dox-compound-name"/>
778 </xsl:call-template>
779 </xsl:variable>
780 <xsl:variable name="ref-id">
781 <xsl:call-template name="make-id">
782 <xsl:with-param name="name" select="$ref-name"/>
783 </xsl:call-template>
784 </xsl:variable>
785 <!--<xsl:text>|2|</xsl:text>-->
786 <!--
787 <xsl:text>[role red def-kind='</xsl:text>
788 <xsl:value-of select="$def-kind"/>
789 <xsl:text>', sec-kind='</xsl:text>
790 <xsl:value-of select="$sec-kind"/>
791 <xsl:text>', ref-id='</xsl:text>
792 <xsl:value-of select="$ref-id"/>
793 <xsl:text>'] </xsl:text>
794 -->
795 <xsl:choose>
796 <xsl:when test="$def-kind = 'namespace'">
797 <xsl:text>[link beast.ref.</xsl:text>
798 <xsl:choose>
799 <xsl:when test="string-length($ref-id) &gt; 0">
800 <xsl:value-of select="concat($ref-id,'__',$dox-name)"/>
801 </xsl:when>
802 <xsl:otherwise>
803 <xsl:value-of select="$dox-name"/>
804 </xsl:otherwise>
805 </xsl:choose>
806 <xsl:text> `</xsl:text>
807 <xsl:value-of name="text" select="$dox-name"/>
808 <xsl:text>`]</xsl:text>
809 </xsl:when>
810 <xsl:when test="$def-kind = 'class' or $def-kind = 'struct'">
811 <xsl:text>[link beast.ref.</xsl:text>
812 <xsl:value-of select="concat($ref-id,'.',$dox-name)"/>
813 <xsl:text> `</xsl:text>
814 <xsl:value-of name="text" select="$name"/>
815 <xsl:text>`]</xsl:text>
816 </xsl:when>
817 <xsl:otherwise>
818 <xsl:text>[role red </xsl:text>
819 <xsl:value-of select="$name"/>
820 <xsl:text>]</xsl:text>
821 </xsl:otherwise>
822 </xsl:choose>
823 </xsl:when>
824 <xsl:otherwise>
825 <xsl:text>[role red </xsl:text>
826 <xsl:value-of select="$name"/>
827 <xsl:text>]</xsl:text>
828 </xsl:otherwise>
829 </xsl:choose>
830 </xsl:template>
831
832
833
834 <xsl:template name="header-requirements">
835 <xsl:param name="file"/>
836 <xsl:value-of select="$newline"/>
837 <xsl:text>[heading Requirements]&#xd;</xsl:text>
838 <xsl:text>['Header: ][^</xsl:text>
839 <xsl:value-of select="substring-after($file, 'include/')"/>
840 <xsl:text>] &#xd;&#xd;</xsl:text>
841 <xsl:choose>
842 <xsl:when test="contains($file, 'beast/core')">
843 <xsl:text>['Convenience header: ][^beast/core.hpp]</xsl:text>
844 </xsl:when>
845 <xsl:when test="contains($file, 'beast/http')">
846 <xsl:text>['Convenience header: ][^beast/http.hpp]</xsl:text>
847 </xsl:when>
848 <xsl:when test="contains($file, 'beast/websocket')">
849 <xsl:text>['Convenience header: ][^beast/websocket.hpp]</xsl:text>
850 </xsl:when>
851 <xsl:when test="contains($file, 'beast/')">
852 </xsl:when>
853 <xsl:otherwise>
854 <xsl:value-of select="$file"/>
855 </xsl:otherwise>
856 </xsl:choose>
857 <xsl:value-of select="$newline"/>
858 </xsl:template>
859
860
861 <!--========== Class ==========-->
862
863 <xsl:template name="class">
864 <xsl:variable name="class-name">
865 <xsl:call-template name="strip-beast-ns">
866 <xsl:with-param name="name" select="compoundname"/>
867 </xsl:call-template>
868 </xsl:variable>
869 <xsl:variable name="unqualified-class-name">
870 <xsl:call-template name="strip-ns">
871 <xsl:with-param name="name" select="compoundname"/>
872 </xsl:call-template>
873 </xsl:variable>
874 <xsl:variable name="class-id">
875 <xsl:call-template name="make-id">
876 <xsl:with-param name="name" select="$class-name"/>
877 </xsl:call-template>
878 </xsl:variable>
879 <xsl:variable name="class-file" select="location/@file"/>
880 <xsl:text>[section:</xsl:text>
881 <xsl:value-of select="$class-id"/>
882 <xsl:text> </xsl:text>
883 <xsl:value-of select="$class-name"/>
884 <xsl:text>]&#xd;</xsl:text>
885 <xsl:apply-templates select="briefdescription" mode="markup"/>
886 <xsl:text>&#xd;```&#xd;</xsl:text>
887 <xsl:apply-templates select="templateparamlist" mode="class-detail"/>
888 <xsl:value-of select="@kind"/>
889 <xsl:text> </xsl:text>
890 <xsl:value-of select="$unqualified-class-name"/>
891 <xsl:if test="count(basecompoundref[not(contains(.,'::detail'))]) > 0">
892 <xsl:text> :</xsl:text>
893 </xsl:if>
894 <xsl:text>&#xd;</xsl:text>
895 <xsl:for-each select="basecompoundref[not(contains(.,'::detail'))]">
896 <xsl:text> </xsl:text>
897 <xsl:if test="@prot='public'">
898 <xsl:text>public </xsl:text>
899 </xsl:if>
900 <xsl:call-template name="strip-beast-ns">
901 <xsl:with-param name="name" select="."/>
902 </xsl:call-template>
903 <xsl:if test="not(position() = last())">
904 <xsl:text>,</xsl:text>
905 </xsl:if>
906 <xsl:text>&#xd;</xsl:text>
907 </xsl:for-each>
908 <xsl:text>```&#xd;</xsl:text>
909 <xsl:call-template name="class-tables">
910 <xsl:with-param name="class-name" select="$class-name"/>
911 <xsl:with-param name="class-id" select="$class-id"/>
912 </xsl:call-template>
913 <xsl:apply-templates select="detaileddescription" mode="markup"/>
914 <xsl:call-template name="header-requirements">
915 <xsl:with-param name="file" select="$class-file"/>
916 </xsl:call-template>
917 <xsl:call-template name="class-members">
918 <xsl:with-param name="class-name" select="$class-name"/>
919 <xsl:with-param name="class-id" select="$class-id"/>
920 <xsl:with-param name="class-file" select="$class-file"/>
921 </xsl:call-template>
922 <xsl:text>[endsect]&#xd;&#xd;&#xd;&#xd;</xsl:text>
923 </xsl:template>
924
925 <xsl:template name="class-tables">
926 <xsl:param name="class-name"/>
927 <xsl:param name="class-id"/>
928 <xsl:if test="
929 count(
930 sectiondef[@kind='public-type'] |
931 innerclass[@prot='public' and not(contains(., '_handler'))]) &gt; 0">
932 <xsl:text>[heading Types]&#xd;</xsl:text>
933 <xsl:text>[table&#xd; [[Name][Description]]&#xd;</xsl:text>
934 <xsl:for-each select="
935 sectiondef[@kind='public-type']/memberdef |
936 innerclass[@prot='public' and not(contains(., '_handler'))]" mode="class-table">
937 <xsl:sort select="concat(name, (.)[not(name)])"/>
938 <xsl:text> [&#xd;</xsl:text>
939 <xsl:choose>
940 <xsl:when test="count(name) &gt; 0">
941 <xsl:text> [[link beast.ref.</xsl:text>
942 <xsl:value-of select="$class-id"/>
943 <xsl:text>.</xsl:text>
944 <xsl:value-of select="name"/>
945 <xsl:text> [*</xsl:text>
946 <xsl:value-of select="name"/>
947 <xsl:text>]]]&#xd; [&#xd; </xsl:text>
948 <xsl:call-template name="escape-name">
949 <xsl:with-param name="text" select="briefdescription"/>
950 </xsl:call-template>
951 <xsl:text>&#xd; ]&#xd;</xsl:text>
952 </xsl:when>
953 <xsl:otherwise>
954 <xsl:variable name="type-name">
955 <xsl:call-template name="strip-beast-ns">
956 <xsl:with-param name="name" select="."/>
957 </xsl:call-template>
958 </xsl:variable>
959 <xsl:variable name="unqualified-type-name">
960 <xsl:call-template name="strip-ns">
961 <xsl:with-param name="name" select="."/>
962 </xsl:call-template>
963 </xsl:variable>
964 <xsl:variable name="type-id">
965 <xsl:call-template name="make-id">
966 <xsl:with-param name="name" select="$type-name"/>
967 </xsl:call-template>
968 </xsl:variable>
969 <xsl:variable name="type-ref-id" select="@refid"/>
970 <xsl:text> [[link beast.ref.</xsl:text>
971 <xsl:value-of select="$type-id"/>
972 <xsl:text> [*</xsl:text>
973 <xsl:value-of select="$unqualified-type-name"/>
974 <xsl:text>]]]&#xd; [&#xd; </xsl:text>
975 <xsl:value-of select="(/doxygen//compounddef[@id=$type-ref-id])[1]/briefdescription"/>
976 <xsl:text>&#xd; ]&#xd;</xsl:text>
977 </xsl:otherwise>
978 </xsl:choose>
979 <xsl:text> ]&#xd;</xsl:text>
980 </xsl:for-each>
981 <xsl:text>]&#xd;</xsl:text>
982 </xsl:if>
983 <xsl:if test="count(sectiondef[@kind='public-func' or @kind='public-static-func']) > 0">
984 <xsl:text>[heading Member Functions]&#xd;</xsl:text>
985 <xsl:text>[table&#xd; [[Name][Description]]&#xd;</xsl:text>
986 <xsl:for-each select="sectiondef[@kind='public-func' or @kind='public-static-func']/memberdef" mode="class-table">
987 <xsl:sort select="name"/>
988 <xsl:variable name="name">
989 <xsl:value-of select="name"/>
990 </xsl:variable>
991 <xsl:variable name="escaped-name">
992 <xsl:call-template name="escape-name">
993 <xsl:with-param name="text" select="$name"/>
994 </xsl:call-template>
995 </xsl:variable>
996 <xsl:variable name="id">
997 <xsl:call-template name="make-id">
998 <xsl:with-param name="name" select="$name"/>
999 </xsl:call-template>
1000 </xsl:variable>
1001 <xsl:variable name="doxygen-id">
1002 <xsl:value-of select="@id"/>
1003 </xsl:variable>
1004 <xsl:variable name="overload-count">
1005 <xsl:value-of select="count(../memberdef[name = $name])"/>
1006 </xsl:variable>
1007 <xsl:variable name="overload-position">
1008 <xsl:for-each select="../memberdef[name = $name]">
1009 <xsl:if test="@id = $doxygen-id">
1010 <xsl:value-of select="position()"/>
1011 </xsl:if>
1012 </xsl:for-each>
1013 </xsl:variable>
1014 <xsl:if test="$overload-position = 1">
1015 <xsl:text> [&#xd;</xsl:text>
1016 <xsl:text> [[link beast.ref.</xsl:text>
1017 <xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/>
1018 <xsl:text> [*</xsl:text>
1019 <xsl:value-of select="$escaped-name"/>
1020 <xsl:text>]]]&#xd; [&#xd; </xsl:text>
1021 <xsl:value-of select="briefdescription"/>
1022 </xsl:if>
1023 <xsl:if test="not($overload-position = 1) and not(briefdescription = preceding-sibling::*/briefdescription)">
1024 <xsl:text>&#xd;&#xd; </xsl:text>
1025 <xsl:value-of select="briefdescription"/>
1026 </xsl:if>
1027 <xsl:if test="$overload-position = $overload-count">
1028 <xsl:text>&#xd; ]&#xd; ]&#xd;</xsl:text>
1029 </xsl:if>
1030 </xsl:for-each>
1031 <xsl:text>]&#xd;</xsl:text>
1032 </xsl:if>
1033 <xsl:if test="count(sectiondef[@kind='protected-func' or @kind='protected-static-func']) > 0">
1034 <xsl:text>[heading Protected Member Functions]&#xd;</xsl:text>
1035 <xsl:text>[table&#xd; [[Name][Description]]&#xd;</xsl:text>
1036 <xsl:for-each select="sectiondef[@kind='protected-func' or @kind='protected-static-func']/memberdef" mode="class-table">
1037 <xsl:sort select="name"/>
1038 <xsl:variable name="name">
1039 <xsl:value-of select="name"/>
1040 </xsl:variable>
1041 <xsl:variable name="id">
1042 <xsl:call-template name="make-id">
1043 <xsl:with-param name="name" select="$name"/>
1044 </xsl:call-template>
1045 </xsl:variable>
1046 <xsl:variable name="doxygen-id">
1047 <xsl:value-of select="@id"/>
1048 </xsl:variable>
1049 <xsl:variable name="overload-count">
1050 <xsl:value-of select="count(../memberdef[name = $name])"/>
1051 </xsl:variable>
1052 <xsl:variable name="overload-position">
1053 <xsl:for-each select="../memberdef[name = $name]">
1054 <xsl:if test="@id = $doxygen-id">
1055 <xsl:value-of select="position()"/>
1056 </xsl:if>
1057 </xsl:for-each>
1058 </xsl:variable>
1059 <xsl:if test="$overload-position = 1">
1060 <xsl:text> [&#xd;</xsl:text>
1061 <xsl:text> [[link beast.ref.</xsl:text>
1062 <xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/>
1063 <xsl:text> [*</xsl:text>
1064 <xsl:value-of select="$name"/>
1065 <xsl:text>]]]&#xd; [&#xd; </xsl:text>
1066 <xsl:value-of select="briefdescription"/>
1067 </xsl:if>
1068 <xsl:if test="not($overload-position = 1) and not(briefdescription = preceding-sibling::*/briefdescription)">
1069 <xsl:text>&#xd;&#xd; </xsl:text>
1070 <xsl:value-of select="briefdescription"/>
1071 </xsl:if>
1072 <xsl:if test="$overload-position = $overload-count">
1073 <xsl:text>&#xd; ]&#xd; ]&#xd;</xsl:text>
1074 </xsl:if>
1075 </xsl:for-each>
1076 <xsl:text>]&#xd;</xsl:text>
1077 </xsl:if>
1078 <xsl:if test="count(sectiondef[@kind='private-func' or @kind='protected-private-func']) &lt; 0">
1079 <xsl:text>[heading Private Member Functions]&#xd;</xsl:text>
1080 <xsl:text>[table&#xd; [[Name][Description]]&#xd;</xsl:text>
1081 <xsl:for-each select="sectiondef[@kind='private-func']/memberdef" mode="class-table">
1082 <xsl:sort select="name"/>
1083 <xsl:variable name="name">
1084 <xsl:value-of select="name"/>
1085 </xsl:variable>
1086 <xsl:variable name="id">
1087 <xsl:call-template name="make-id">
1088 <xsl:with-param name="name" select="$name"/>
1089 </xsl:call-template>
1090 </xsl:variable>
1091 <xsl:variable name="doxygen-id">
1092 <xsl:value-of select="@id"/>
1093 </xsl:variable>
1094 <xsl:variable name="overload-count">
1095 <xsl:value-of select="count(../memberdef[name = $name])"/>
1096 </xsl:variable>
1097 <xsl:variable name="overload-position">
1098 <xsl:for-each select="../memberdef[name = $name]">
1099 <xsl:if test="@id = $doxygen-id">
1100 <xsl:value-of select="position()"/>
1101 </xsl:if>
1102 </xsl:for-each>
1103 </xsl:variable>
1104 <xsl:if test="$overload-position = 1">
1105 <xsl:text> [&#xd;</xsl:text>
1106 <xsl:text> [[link beast.ref.</xsl:text>
1107 <xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/>
1108 <xsl:text> [*</xsl:text>
1109 <xsl:value-of select="$name"/>
1110 <xsl:text>]]]&#xd; [&#xd; </xsl:text>
1111 <xsl:value-of select="briefdescription"/>
1112 </xsl:if>
1113 <xsl:if test="not($overload-position = 1) and not(briefdescription = preceding-sibling::*/briefdescription)">
1114 <xsl:text>&#xd;&#xd; </xsl:text>
1115 <xsl:value-of select="briefdescription"/>
1116 </xsl:if>
1117 <xsl:if test="$overload-position = $overload-count">
1118 <xsl:text>&#xd; ]&#xd; ]&#xd;</xsl:text>
1119 </xsl:if>
1120 </xsl:for-each>
1121 <xsl:text>]&#xd;</xsl:text>
1122 </xsl:if>
1123 <xsl:if test="count(sectiondef[@kind='public-static-attrib']) &gt; 0">
1124 <xsl:text>[heading Static Data Members]&#xd;</xsl:text>
1125 <xsl:text>[table&#xd; [[Name][Description]]&#xd;</xsl:text>
1126 <xsl:for-each select="sectiondef[@kind='public-static-attrib']/memberdef" mode="class-table">
1127 <xsl:sort select="name"/>
1128 <xsl:text> [&#xd;</xsl:text>
1129 <xsl:text> [[link beast.ref.</xsl:text>
1130 <xsl:value-of select="$class-id"/>.<xsl:value-of select="name"/>
1131 <xsl:text> [*</xsl:text>
1132 <xsl:value-of select="name"/>
1133 <xsl:text>]]]&#xd; [&#xd; </xsl:text>
1134 <xsl:value-of select="briefdescription"/>
1135 <xsl:text>&#xd; ]&#xd; ]&#xd;</xsl:text>
1136 </xsl:for-each>
1137 <xsl:text>]&#xd;</xsl:text>
1138 </xsl:if>
1139 <xsl:if test="count(sectiondef[@kind='public-attrib']) &gt; 0">
1140 <xsl:text>[heading Data Members]&#xd;</xsl:text>
1141 <xsl:text>[table&#xd; [[Name][Description]]&#xd;</xsl:text>
1142 <xsl:for-each select="sectiondef[@kind='public-attrib']/memberdef" mode="class-table">
1143 <xsl:sort select="name"/>
1144 <xsl:text> [&#xd;</xsl:text>
1145 <xsl:text> [[link beast.ref.</xsl:text>
1146 <xsl:value-of select="$class-id"/>.<xsl:value-of select="name"/>
1147 <xsl:text> [*</xsl:text>
1148 <xsl:value-of select="name"/>
1149 <xsl:text>]]]&#xd; [&#xd; </xsl:text>
1150 <xsl:value-of select="briefdescription"/>
1151 <xsl:text>&#xd; ]&#xd; ]&#xd;</xsl:text>
1152 </xsl:for-each>
1153 <xsl:text>]&#xd;</xsl:text>
1154 </xsl:if>
1155 <xsl:if test="count(sectiondef[@kind='protected-attrib' or @kind='protected-static-attrib']) > 0">
1156 <xsl:text>[heading Protected Data Members]&#xd;</xsl:text>
1157 <xsl:text>[table&#xd; [[Name][Description]]&#xd;</xsl:text>
1158 <xsl:for-each select="sectiondef[@kind='protected-attrib' or @kind='protected-static-attrib']/memberdef" mode="class-table">
1159 <xsl:sort select="name"/>
1160 <xsl:text> [&#xd;</xsl:text>
1161 <xsl:text> [[link beast.ref.</xsl:text>
1162 <xsl:value-of select="$class-id"/>.<xsl:value-of select="name"/>
1163 <xsl:text> [*</xsl:text>
1164 <xsl:value-of select="name"/>
1165 <xsl:text>]]]&#xd; [&#xd; </xsl:text>
1166 <xsl:value-of select="briefdescription"/>
1167 <xsl:text>&#xd; ]&#xd; ]&#xd;</xsl:text>
1168 </xsl:for-each>
1169 <xsl:text>]&#xd;</xsl:text>
1170 </xsl:if>
1171 <xsl:if test="count(sectiondef[@kind='private-attrib' or @kind='private-static-attrib']) &lt; 0">
1172 <xsl:text>[heading Private Data Members]&#xd;</xsl:text>
1173 <xsl:text>[table&#xd; [[Name][Description]]&#xd;</xsl:text>
1174 <xsl:for-each select="sectiondef[@kind='private-attrib' or @kind='private-static-attrib']/memberdef" mode="class-table">
1175 <xsl:sort select="name"/>
1176 <xsl:text> [&#xd;</xsl:text>
1177 <xsl:text> [[link beast.ref.</xsl:text>
1178 <xsl:value-of select="$class-id"/>.<xsl:value-of select="name"/>
1179 <xsl:text> [*</xsl:text>
1180 <xsl:value-of select="name"/>
1181 <xsl:text>]]]&#xd; [&#xd; </xsl:text>
1182 <xsl:value-of select="briefdescription"/>
1183 <xsl:text>&#xd; ]&#xd; ]&#xd;</xsl:text>
1184 </xsl:for-each>
1185 <xsl:text>]&#xd;</xsl:text>
1186 </xsl:if>
1187 <xsl:if test="count(sectiondef[@kind='friend']/memberdef[not(type = 'friend class') and not(contains(name, '_helper'))]) &gt; 0">
1188 <xsl:text>[heading Friends]&#xd;</xsl:text>
1189 <xsl:text>[table&#xd; [[Name][Description]]&#xd;</xsl:text>
1190 <xsl:for-each select="sectiondef[@kind='friend']/memberdef[not(type = 'friend class') and not(contains(name, '_helper'))]" mode="class-table">
1191 <xsl:sort select="name"/>
1192 <xsl:variable name="name">
1193 <xsl:value-of select="name"/>
1194 </xsl:variable>
1195 <xsl:variable name="id">
1196 <xsl:call-template name="make-id">
1197 <xsl:with-param name="name" select="$name"/>
1198 </xsl:call-template>
1199 </xsl:variable>
1200 <xsl:variable name="doxygen-id">
1201 <xsl:value-of select="@id"/>
1202 </xsl:variable>
1203 <xsl:variable name="overload-count">
1204 <xsl:value-of select="count(../memberdef[name = $name])"/>
1205 </xsl:variable>
1206 <xsl:variable name="overload-position">
1207 <xsl:for-each select="../memberdef[name = $name]">
1208 <xsl:if test="@id = $doxygen-id">
1209 <xsl:value-of select="position()"/>
1210 </xsl:if>
1211 </xsl:for-each>
1212 </xsl:variable>
1213 <xsl:if test="$overload-position = 1">
1214 <xsl:text> [&#xd;</xsl:text>
1215 <xsl:text> [[link beast.ref.</xsl:text>
1216 <xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/>
1217 <xsl:text> [*</xsl:text>
1218 <xsl:value-of select="$name"/>
1219 <xsl:text>]]]&#xd; [&#xd; </xsl:text>
1220 <xsl:value-of select="briefdescription"/>
1221 </xsl:if>
1222 <xsl:if test="not($overload-position = 1) and not(briefdescription = preceding-sibling::*/briefdescription)">
1223 <xsl:text>&#xd;&#xd; </xsl:text>
1224 <xsl:value-of select="briefdescription"/>
1225 </xsl:if>
1226 <xsl:if test="$overload-position = $overload-count">
1227 <xsl:text>&#xd; ]&#xd; ]&#xd;</xsl:text>
1228 </xsl:if>
1229 </xsl:for-each>
1230 <xsl:text>]&#xd;</xsl:text>
1231 </xsl:if>
1232 <xsl:if test="count(sectiondef[@kind='related']/memberdef) &gt; 0">
1233 <xsl:text>[heading Related Functions]&#xd;</xsl:text>
1234 <xsl:text>[table&#xd; [[Name][Description]]&#xd;</xsl:text>
1235 <xsl:for-each select="sectiondef[@kind='related']/memberdef" mode="class-table">
1236 <xsl:sort select="name"/>
1237 <xsl:variable name="name">
1238 <xsl:value-of select="name"/>
1239 </xsl:variable>
1240 <xsl:variable name="id">
1241 <xsl:call-template name="make-id">
1242 <xsl:with-param name="name" select="$name"/>
1243 </xsl:call-template>
1244 </xsl:variable>
1245 <xsl:variable name="doxygen-id">
1246 <xsl:value-of select="@id"/>
1247 </xsl:variable>
1248 <xsl:variable name="overload-count">
1249 <xsl:value-of select="count(../memberdef[name = $name])"/>
1250 </xsl:variable>
1251 <xsl:variable name="overload-position">
1252 <xsl:for-each select="../memberdef[name = $name]">
1253 <xsl:if test="@id = $doxygen-id">
1254 <xsl:value-of select="position()"/>
1255 </xsl:if>
1256 </xsl:for-each>
1257 </xsl:variable>
1258 <xsl:if test="$overload-position = 1">
1259 [
1260 [[link beast.ref.<xsl:value-of select="$class-id"/>.<xsl:value-of select="$id"/>
1261 <xsl:text> </xsl:text>[*<xsl:value-of select="$name"/><xsl:text>]]]
1262 [</xsl:text><xsl:value-of select="briefdescription"/>
1263 </xsl:if>
1264 <xsl:if test="not($overload-position = 1) and not(briefdescription = preceding-sibling::*/briefdescription)">
1265 <xsl:value-of select="$newline"/>
1266 <xsl:value-of select="$newline"/>
1267 <xsl:text> </xsl:text>
1268 <xsl:value-of select="briefdescription"/>
1269 </xsl:if>
1270 <xsl:if test="$overload-position = $overload-count">
1271 <xsl:text>]
1272 ]
1273 </xsl:text>
1274 </xsl:if>
1275 </xsl:for-each>
1276 ]
1277 </xsl:if>
1278 </xsl:template>
1279
1280
1281
1282 <xsl:template name="class-members">
1283 <xsl:param name="class-name"/>
1284 <xsl:param name="class-id"/>
1285 <xsl:param name="class-file"/>
1286 <xsl:apply-templates select="sectiondef[@kind='public-type' or @kind='public-func' or @kind='public-static-func' or @kind='public-attrib' or @kind='public-static-attrib' or @kind='protected-func' or @kind='protected-static-func' or @kind='protected-attrib' or @kind='protected-static-attrib' or @kind='friend' or @kind='related']/memberdef[not(type = 'friend class') and not(contains(name, '_helper'))]" mode="class-detail">
1287 <xsl:sort select="name"/>
1288 <xsl:with-param name="class-name" select="$class-name"/>
1289 <xsl:with-param name="class-id" select="$class-id"/>
1290 <xsl:with-param name="class-file" select="$class-file"/>
1291 </xsl:apply-templates>
1292 <xsl:if test="$class-name = 'io_service::service'">
1293 <xsl:apply-templates select="sectiondef[@kind='private-func']/memberdef[not(type = 'friend class') and not(contains(name, '_helper'))]" mode="class-detail">
1294 <xsl:sort select="name"/>
1295 <xsl:with-param name="class-name" select="$class-name"/>
1296 <xsl:with-param name="class-id" select="$class-id"/>
1297 <xsl:with-param name="class-file" select="$class-file"/>
1298 </xsl:apply-templates>
1299 </xsl:if>
1300 </xsl:template>
1301
1302
1303
1304 <!-- Class detail -->
1305
1306 <xsl:template match="memberdef" mode="class-detail">
1307 <xsl:param name="class-name"/>
1308 <xsl:param name="class-id"/>
1309 <xsl:param name="class-file"/>
1310 <xsl:variable name="name">
1311 <xsl:value-of select="name"/>
1312 </xsl:variable>
1313 <xsl:variable name="escaped-name">
1314 <xsl:call-template name="escape-name">
1315 <xsl:with-param name="text" select="$name"/>
1316 </xsl:call-template>
1317 </xsl:variable>
1318 <xsl:variable name="id">
1319 <xsl:call-template name="make-id">
1320 <xsl:with-param name="name" select="$name"/>
1321 </xsl:call-template>
1322 </xsl:variable>
1323 <xsl:variable name="doxygen-id">
1324 <xsl:value-of select="@id"/>
1325 </xsl:variable>
1326 <xsl:variable name="overload-count">
1327 <xsl:value-of select="count(../memberdef[name = $name])"/>
1328 </xsl:variable>
1329 <xsl:variable name="overload-position">
1330 <xsl:for-each select="../memberdef[name = $name]">
1331 <xsl:if test="@id = $doxygen-id">
1332 <xsl:value-of select="position()"/>
1333 </xsl:if>
1334 </xsl:for-each>
1335 </xsl:variable>
1336 <xsl:if test="$overload-count &gt; 1 and $overload-position = 1">
1337 <xsl:text>[section:</xsl:text>
1338 <xsl:value-of select="$id"/>
1339 <xsl:text> </xsl:text>
1340 <xsl:value-of select="$class-name"/>
1341 <xsl:text>::</xsl:text>
1342 <xsl:value-of select="$escaped-name"/>
1343 <xsl:text>]&#xd;</xsl:text>
1344 <xsl:text>[indexterm2 </xsl:text>
1345 <xsl:value-of select="$escaped-name"/>
1346 <xsl:text>..</xsl:text>
1347 <xsl:value-of select="$class-name"/>
1348 <xsl:text>]&#xd;</xsl:text>
1349 <xsl:apply-templates select="briefdescription" mode="markup"/>
1350 <xsl:text>```&#xd;</xsl:text>
1351 <xsl:for-each select="../memberdef[name = $name]">
1352 <xsl:if test="position() &gt; 1">
1353 <xsl:text>&#xd;</xsl:text>
1354 <xsl:if test=" not(briefdescription = preceding-sibling::*/briefdescription)">
1355 <xsl:text>```&#xd;</xsl:text>
1356 <xsl:apply-templates select="briefdescription" mode="markup"/>
1357 <xsl:text>```&#xd;</xsl:text>
1358 </xsl:if>
1359 </xsl:if>
1360 <xsl:apply-templates select="templateparamlist" mode="class-detail"/>
1361 <xsl:if test="@explicit='yes'">explicit&#xd;</xsl:if>
1362 <xsl:if test="@friend='yes'">friend&#xd;</xsl:if>
1363 <xsl:if test="@static='yes'">static&#xd;</xsl:if>
1364 <xsl:if test="@virt='virtual'">virtual&#xd;</xsl:if>
1365 <xsl:variable name="stripped-type">
1366 <xsl:call-template name="cleanup-type">
1367 <xsl:with-param name="name" select="type"/>
1368 </xsl:call-template>
1369 </xsl:variable>
1370 <xsl:if test="string-length($stripped-type) &gt; 0">
1371 <xsl:value-of select="$stripped-type"/>
1372 <xsl:text>&#xd;</xsl:text>
1373 </xsl:if>
1374 <xsl:text>``[link beast.ref.</xsl:text>
1375 <xsl:value-of select="$class-id"/>
1376 <xsl:text>.</xsl:text>
1377 <xsl:value-of select="$id"/>
1378 <xsl:text>.overload</xsl:text>
1379 <xsl:value-of select="position()"/>
1380 <xsl:text> </xsl:text>
1381 <xsl:value-of select="name"/>
1382 <xsl:text>]``(</xsl:text>
1383 <xsl:apply-templates select="param" mode="class-detail"/>
1384 <xsl:text>)</xsl:text>
1385 <xsl:if test="@const='yes'">
1386 <xsl:text> const</xsl:text>
1387 </xsl:if>
1388 <xsl:text>;&#xd;</xsl:text>
1389 </xsl:for-each>
1390 <xsl:text>```&#xd;</xsl:text>
1391 </xsl:if>
1392
1393 <!-- Member function detail -->
1394
1395 <xsl:text>[section:</xsl:text>
1396 <xsl:if test="$overload-count = 1">
1397 <xsl:value-of select="$id"/>
1398 </xsl:if>
1399 <xsl:if test="$overload-count &gt; 1">
1400 <xsl:text>overload</xsl:text>
1401 <xsl:value-of select="$overload-position"/>
1402 </xsl:if>
1403 <xsl:text> </xsl:text>
1404 <xsl:value-of select="$class-name"/>
1405 <xsl:text>::</xsl:text>
1406 <xsl:value-of select="$escaped-name"/>
1407 <xsl:if test="$overload-count &gt; 1">
1408 <xsl:text> (</xsl:text>
1409 <xsl:value-of select="$overload-position"/>
1410 <xsl:text> of </xsl:text>
1411 <xsl:value-of select="$overload-count"/>
1412 <xsl:text> overloads)</xsl:text>
1413 </xsl:if>
1414 <xsl:text>]&#xd;</xsl:text>
1415 <xsl:if test="not(starts-with($doxygen-id, ../../@id))">
1416 <xsl:variable name="inherited-from" select="/doxygen/compounddef[starts-with($doxygen-id, @id)]/compoundname"/>
1417 <xsl:if test="not(contains($inherited-from, '::detail'))">
1418 <xsl:text>['Inherited from </xsl:text>
1419 <xsl:call-template name="strip-beast-ns">
1420 <xsl:with-param name="name" select="$inherited-from"/>
1421 </xsl:call-template>
1422 <xsl:text>.]&#xd;</xsl:text>
1423 </xsl:if>
1424 </xsl:if>
1425 <xsl:if test="$overload-count = 1">
1426 <xsl:text>[indexterm2 </xsl:text>
1427 <xsl:value-of select="$escaped-name"/>
1428 <xsl:text>..</xsl:text>
1429 <xsl:value-of select="$class-name"/>
1430 <xsl:text>]&#xd;</xsl:text>
1431 </xsl:if>
1432 <xsl:apply-templates select="briefdescription" mode="markup"/>
1433 <xsl:choose>
1434 <xsl:when test="@kind='typedef'">
1435 <xsl:call-template name="typedef" mode="class-detail">
1436 <xsl:with-param name="class-name" select="$class-name"/>
1437 </xsl:call-template>
1438 </xsl:when>
1439 <xsl:when test="@kind='variable'">
1440 <xsl:call-template name="variable" mode="class-detail"/>
1441 </xsl:when>
1442 <xsl:when test="@kind='enum'">
1443 <xsl:call-template name="enum" mode="class-detail">
1444 <xsl:with-param name="enum-name" select="$class-name"/>
1445 </xsl:call-template>
1446 </xsl:when>
1447 <xsl:when test="@kind='function'">
1448 <xsl:text>```&#xd;</xsl:text>
1449 <xsl:call-template name="function" mode="class-detail"/>
1450 <xsl:text>```&#xd;</xsl:text>
1451 </xsl:when>
1452 <xsl:when test="@kind='friend'">
1453 <xsl:text>```&#xd;</xsl:text>
1454 <xsl:call-template name="function" mode="class-detail"/>
1455 <xsl:text>```&#xd;</xsl:text>
1456 </xsl:when>
1457 </xsl:choose>
1458 <xsl:apply-templates select="detaileddescription" mode="markup"/>
1459 <xsl:if test="@kind='typedef' or @kind='friend'">
1460 <xsl:call-template name="header-requirements">
1461 <xsl:with-param name="file" select="$class-file"/>
1462 </xsl:call-template>
1463 </xsl:if>
1464 <xsl:choose>
1465 <xsl:when test="$overload-count &gt; 1 and $overload-position = $overload-count">
1466 <xsl:text>[endsect]&#xd;[endsect]&#xd;&#xd;&#xd;&#xd;</xsl:text>
1467 </xsl:when>
1468 <xsl:otherwise>
1469 <xsl:text>[endsect]&#xd;</xsl:text>
1470 </xsl:otherwise>
1471 </xsl:choose>
1472 </xsl:template>
1473
1474
1475
1476 <xsl:template name="typedef">
1477 <xsl:param name="class-name"/>
1478 <xsl:text>```&#xd;using </xsl:text>
1479 <xsl:value-of select="name"/>
1480 <xsl:text> = </xsl:text>
1481 <xsl:variable name="stripped-type">
1482 <xsl:call-template name="cleanup-type">
1483 <xsl:with-param name="name" select="type"/>
1484 </xsl:call-template>
1485 </xsl:variable>
1486 <xsl:if test="string-length($stripped-type) &gt; 0">
1487 <xsl:value-of select="$stripped-type"/>
1488 </xsl:if>
1489 <xsl:text>;&#xd;```&#xd;</xsl:text>
1490 <xsl:if test="count(type/ref) &gt; 0 and not(contains(type, '*'))">
1491 <xsl:variable name="class-refid">
1492 <xsl:for-each select="type/ref[1]">
1493 <xsl:value-of select="@refid"/>
1494 </xsl:for-each>
1495 </xsl:variable>
1496 <xsl:variable name="name" select="name"/>
1497 <xsl:for-each select="/doxygen/compounddef[@id=$class-refid]">
1498 <xsl:call-template name="class-tables">
1499 <xsl:with-param name="class-name">
1500 <xsl:value-of select="concat($class-name, '::', $name)"/>
1501 </xsl:with-param>
1502 <xsl:with-param name="class-id">
1503 <xsl:call-template name="make-id">
1504 <xsl:with-param name="name">
1505 <xsl:call-template name="strip-beast-ns">
1506 <xsl:with-param name="name" select="compoundname"/>
1507 </xsl:call-template>
1508 </xsl:with-param>
1509 </xsl:call-template>
1510 </xsl:with-param>
1511 </xsl:call-template>
1512 <xsl:apply-templates select="detaileddescription" mode="markup"/>
1513 </xsl:for-each>
1514 </xsl:if>
1515 </xsl:template>
1516
1517
1518
1519 <xsl:template name="variable">
1520 <xsl:text>```&#xd;</xsl:text>
1521 <xsl:if test="@static='yes'">
1522 <xsl:text>static&#xd;</xsl:text>
1523 </xsl:if>
1524 <xsl:value-of select="type"/>
1525 <xsl:text> </xsl:text>
1526 <xsl:value-of select="name"/>
1527 <xsl:if test="count(initializer) = 1">
1528 <xsl:text> </xsl:text>
1529 <xsl:value-of select="initializer"/>
1530 </xsl:if>
1531 <xsl:text>;&#xd;```&#xd;</xsl:text>
1532 </xsl:template>
1533
1534
1535
1536 <xsl:template name="enum">
1537 <xsl:param name="enum-name"/>
1538 <xsl:text>```&#xd;</xsl:text>
1539 <xsl:text>enum </xsl:text>
1540 <xsl:value-of select="name"/>
1541 <xsl:text>&#xd;```&#xd;</xsl:text>
1542 <xsl:if test="count(enumvalue) &gt; 0">
1543 <xsl:text>&#xd;</xsl:text>
1544 <xsl:for-each select="enumvalue">
1545 <xsl:text>[indexterm2 </xsl:text>
1546 <xsl:value-of select="name"/>
1547 <xsl:text>..</xsl:text>
1548 <xsl:value-of select="$enum-name"/>
1549 <xsl:text>]</xsl:text>
1550 <xsl:text>&#xd;</xsl:text>
1551 </xsl:for-each>
1552 <xsl:text>[heading Values]&#xd;</xsl:text>
1553 <xsl:text>[variablelist&#xd;</xsl:text>
1554 <xsl:for-each select="enumvalue">
1555 <xsl:text> [[</xsl:text>
1556 <xsl:value-of select="name"/>
1557 <xsl:text>]&#xd; [</xsl:text>
1558 <xsl:value-of select="briefdescription"/>
1559 <xsl:text>]]&#xd;</xsl:text>
1560 </xsl:for-each>
1561 <xsl:text>]&#xd;</xsl:text>
1562 </xsl:if>
1563 </xsl:template>
1564
1565
1566
1567 <xsl:template name="function">
1568 <xsl:variable name="doxygen-id">
1569 <xsl:value-of select="@id"/>
1570 </xsl:variable>
1571 <xsl:choose>
1572 <xsl:when test="count(/doxygen//memberdef[@id=$doxygen-id]/templateparamlist) = 1">
1573 <xsl:apply-templates select="/doxygen//memberdef[@id=$doxygen-id]/templateparamlist" mode="class-detail"/>
1574 </xsl:when>
1575 <xsl:otherwise>
1576 <xsl:apply-templates select="templateparamlist" mode="class-detail"/>
1577 </xsl:otherwise>
1578 </xsl:choose>
1579 <xsl:variable name="stripped-type">
1580 <xsl:call-template name="cleanup-type">
1581 <xsl:with-param name="name" select="type"/>
1582 </xsl:call-template>
1583 </xsl:variable>
1584 <xsl:if test="@static='yes'">static&#xd;</xsl:if>
1585 <xsl:if test="@virt='virtual'">virtual&#xd;</xsl:if>
1586 <xsl:if test="string-length($stripped-type) &gt; 0">
1587 <xsl:value-of select="$stripped-type"/>
1588 <xsl:text>&#xd;</xsl:text>
1589 </xsl:if>
1590 <xsl:value-of select="name"/>
1591 <xsl:text>(</xsl:text>
1592 <xsl:apply-templates select="param" mode="class-detail"/>
1593 <xsl:text>)</xsl:text>
1594 <xsl:if test="@const='yes'"> const</xsl:if>
1595 <xsl:text>;&#xd;</xsl:text>
1596 </xsl:template>
1597
1598
1599
1600 <xsl:template match="templateparamlist" mode="class-detail">
1601 <xsl:text>template&lt;&#xd;</xsl:text>
1602 <xsl:apply-templates select="param" mode="class-detail-template"/>
1603 <xsl:text>&gt;&#xd;</xsl:text>
1604 </xsl:template>
1605
1606
1607
1608 <xsl:template match="param" mode="class-detail-template">
1609 <xsl:text> </xsl:text>
1610 <xsl:choose>
1611 <xsl:when test="type = 'class AsyncStream'">
1612 <xsl:text>class ``[link beast.ref.streams.AsyncStream [*AsyncStream]]``</xsl:text>
1613 </xsl:when>
1614 <xsl:when test="type = 'class AsyncReadStream'">
1615 <xsl:text>class __AsyncReadStream__</xsl:text>
1616 </xsl:when>
1617 <xsl:when test="type = 'class AsyncWriteStream'">
1618 <xsl:text>class __AsyncWriteStream__</xsl:text>
1619 </xsl:when>
1620 <xsl:when test="type = 'class Body'">
1621 <xsl:text>class ``[link beast.ref.Body [*Body]]``</xsl:text>
1622 </xsl:when>
1623 <xsl:when test="type = 'class BufferSequence'">
1624 <xsl:text>class ``[link beast.ref.BufferSequence [*BufferSequence]]``</xsl:text>
1625 </xsl:when>
1626 <xsl:when test="(type = 'class' or type = 'class...') and declname = 'BufferSequence'">
1627 <xsl:value-of select="type"/>
1628 <xsl:text> ``[link beast.ref.BufferSequence [*BufferSequence]]``</xsl:text>
1629 </xsl:when>
1630 <xsl:when test="declname = 'CompletionHandler' or type = 'class CompletionHandler'">
1631 <xsl:text>class __CompletionHandler__</xsl:text>
1632 </xsl:when>
1633 <xsl:when test="declname = 'ConstBufferSequence' or type = 'class ConstBufferSequence'">
1634 <xsl:text>class __ConstBufferSequence__</xsl:text>
1635 </xsl:when>
1636 <xsl:when test="declname = 'DynamicBuffer' or type = 'class DynamicBuffer'">
1637 <xsl:text>class ``[link beast.ref.DynamicBuffer [*DynamicBuffer]]``</xsl:text>
1638 </xsl:when>
1639 <xsl:when test="declname = 'Handler' or type = 'class Handler'">
1640 <xsl:text>class __Handler__</xsl:text>
1641 </xsl:when>
1642 <xsl:when test="declname = 'MutableBufferSequence' or type = 'class MutableBufferSequence'">
1643 <xsl:text>class __MutableBufferSequence__</xsl:text>
1644 </xsl:when>
1645 <xsl:when test="declname = 'Parser' or type = 'class Parser'">
1646 <xsl:text>class ``[link beast.ref.Parser [*Parser]]``</xsl:text>
1647 </xsl:when>
1648 <xsl:when test="declname = 'Stream' or type = 'class Stream'">
1649 <xsl:text>class ``[link beast.ref.streams.Stream [*Stream]]``</xsl:text>
1650 </xsl:when>
1651 <xsl:when test="type = 'class SyncStream'">
1652 <xsl:text>class ``[link beast.ref.streams.SyncStream [*SyncStream]]``</xsl:text>
1653 </xsl:when>
1654 <xsl:when test="declname = 'SyncReadStream' or type = 'class SyncReadStream'">
1655 <xsl:text>class __SyncReadStream__</xsl:text>
1656 </xsl:when>
1657 <xsl:when test="declname = 'SyncWriteStream' or type = 'class SyncWriteStream'">
1658 <xsl:text>class __SyncWriteStream__</xsl:text>
1659 </xsl:when>
1660
1661 <xsl:when test="declname = 'T'">
1662 <xsl:value-of select="declname"/>
1663 </xsl:when>
1664 <xsl:when test="declname = 'T1'">
1665 <xsl:value-of select="declname"/>
1666 </xsl:when>
1667 <xsl:when test="declname = 'TN'">
1668 <xsl:value-of select="declname"/>
1669 </xsl:when>
1670 <xsl:when test="count(declname) > 0">
1671 <xsl:value-of select="type"/>
1672 <xsl:text> </xsl:text>
1673 <xsl:value-of select="declname"/>
1674 </xsl:when>
1675 <xsl:otherwise>
1676 <xsl:value-of select="type"/>
1677 <!--<xsl:value-of select="concat(' ``[link beast.ref.', declname, ' ', declname, ']``')"/>-->
1678 </xsl:otherwise>
1679 </xsl:choose>
1680 <xsl:if test="count(defval) > 0">
1681 <xsl:text> = </xsl:text>
1682 <xsl:value-of select="defval"/>
1683 </xsl:if>
1684 <xsl:if test="not(position() = last())">
1685 <xsl:text>,&#xd;</xsl:text>
1686 </xsl:if>
1687 </xsl:template>
1688
1689 <xsl:template match="param" mode="class-detail">
1690 <xsl:text>&#xd; </xsl:text>
1691 <xsl:choose>
1692 <xsl:when test="string-length(array) &gt; 0">
1693 <xsl:value-of select="substring-before(type, '&amp;')"/>
1694 <xsl:text>(&amp;</xsl:text>
1695 <xsl:value-of select="declname"/>
1696 <xsl:text>)</xsl:text>
1697 <xsl:value-of select="array"/>
1698 </xsl:when>
1699 <xsl:otherwise>
1700 <xsl:call-template name="cleanup-param">
1701 <xsl:with-param name="name" select="type"/>
1702 </xsl:call-template>
1703 <xsl:if test="count(declname) > 0">
1704 <xsl:text> </xsl:text>
1705 <xsl:value-of select="declname"/>
1706 </xsl:if>
1707 </xsl:otherwise>
1708 </xsl:choose>
1709 <xsl:if test="count(defval) > 0">
1710 <xsl:text> = </xsl:text>
1711 <xsl:value-of select="defval"/>
1712 </xsl:if>
1713 <xsl:if test="not(position() = last())">
1714 <xsl:text>,</xsl:text>
1715 </xsl:if>
1716 </xsl:template>
1717
1718 <xsl:template match="*" mode="class-detail"/>
1719
1720 <!--========== Namespace ==========-->
1721
1722 <xsl:template name="namespace-memberdef">
1723 <xsl:variable name="name">
1724 <xsl:call-template name="strip-beast-ns">
1725 <xsl:with-param name="name" select="concat(../../compoundname, '::', name)"/>
1726 </xsl:call-template>
1727 </xsl:variable>
1728 <xsl:variable name="unqualified-name">
1729 <xsl:call-template name="strip-ns">
1730 <xsl:with-param name="name" select="$name"/>
1731 </xsl:call-template>
1732 </xsl:variable>
1733 <xsl:variable name="id">
1734 <xsl:call-template name="make-id">
1735 <xsl:with-param name="name" select="$name"/>
1736 </xsl:call-template>
1737 </xsl:variable>
1738 <xsl:variable name="doxygen-id">
1739 <xsl:value-of select="@id"/>
1740 </xsl:variable>
1741 <xsl:variable name="overload-count">
1742 <xsl:value-of select="count(../memberdef[name = $unqualified-name])"/>
1743 </xsl:variable>
1744 <xsl:variable name="overload-position">
1745 <xsl:for-each select="../memberdef[name = $unqualified-name]">
1746 <xsl:if test="@id = $doxygen-id">
1747 <xsl:value-of select="position()"/>
1748 </xsl:if>
1749 </xsl:for-each>
1750 </xsl:variable>
1751 <xsl:if test="$overload-count &gt; 1 and $overload-position = 1">
1752 <xsl:text>[section:</xsl:text>
1753 <xsl:value-of select="$id"/>
1754 <xsl:text> </xsl:text>
1755 <xsl:value-of select="$name"/>
1756 <xsl:text>]&#xd;</xsl:text>
1757 <xsl:text>[indexterm1 </xsl:text>
1758 <xsl:value-of select="$name"/>
1759 <xsl:text>]</xsl:text>
1760 <xsl:choose>
1761 <xsl:when test="count(/doxygen/compounddef[@kind='group' and compoundname=$name]) &gt; 0">
1762 <xsl:for-each select="/doxygen/compounddef[@kind='group' and compoundname=$name]">
1763 <xsl:apply-templates select="briefdescription" mode="markup"/>
1764 </xsl:for-each>
1765 </xsl:when>
1766 <xsl:otherwise>
1767 <xsl:apply-templates select="briefdescription" mode="markup"/>
1768 </xsl:otherwise>
1769 </xsl:choose>
1770 <xsl:text>```&#xd;</xsl:text>
1771 <xsl:for-each select="../memberdef[name = $unqualified-name]">
1772 <xsl:if test="position() &gt; 1">
1773 <xsl:text>&#xd;</xsl:text>
1774 <xsl:if test=" not(briefdescription = preceding-sibling::*/briefdescription)">
1775 <xsl:text>```&#xd;</xsl:text>
1776 <xsl:apply-templates select="briefdescription" mode="markup"/>
1777 <xsl:text>```&#xd;</xsl:text>
1778 </xsl:if>
1779 </xsl:if>
1780 <xsl:variable name="stripped-type">
1781 <xsl:call-template name="cleanup-type">
1782 <xsl:with-param name="name" select="type"/>
1783 </xsl:call-template>
1784 </xsl:variable>
1785 <xsl:apply-templates select="templateparamlist" mode="class-detail"/>
1786 <xsl:if test="string-length($stripped-type) &gt; 0">
1787 <xsl:value-of select="$stripped-type"/>
1788 <xsl:text>&#xd;</xsl:text>
1789 </xsl:if>
1790 <xsl:text>``[link beast.ref.</xsl:text>
1791 <xsl:value-of select="$id"/>
1792 <xsl:text>.overload</xsl:text>
1793 <xsl:value-of select="position()"/>
1794 <xsl:text> </xsl:text>
1795 <xsl:value-of select="name"/>
1796 <xsl:text>]``(</xsl:text>
1797 <xsl:apply-templates select="param" mode="class-detail"/>
1798 <xsl:text>);&#xd;&#xd;</xsl:text>
1799 </xsl:for-each>
1800 <xsl:text>```&#xd;</xsl:text>
1801 <xsl:for-each select="/doxygen/compounddef[@kind='group' and compoundname=$name]">
1802 <xsl:apply-templates select="detaileddescription" mode="markup"/>
1803 </xsl:for-each>
1804 <xsl:call-template name="header-requirements">
1805 <xsl:with-param name="file" select="location/@file"/>
1806 </xsl:call-template>
1807 </xsl:if>
1808 <xsl:if test="$overload-count = 1">
1809 <xsl:text>[section:</xsl:text>
1810 <xsl:value-of select="$id"/>
1811 </xsl:if>
1812 <xsl:if test="$overload-count &gt; 1">
1813 <xsl:text>[section:</xsl:text>
1814 <xsl:text>overload</xsl:text>
1815 <xsl:value-of select="$overload-position"/>
1816 </xsl:if>
1817 <xsl:text> </xsl:text>
1818 <xsl:value-of select="$name"/>
1819 <xsl:if test="$overload-count &gt; 1">
1820 <xsl:text> (</xsl:text>
1821 <xsl:value-of select="$overload-position"/>
1822 <xsl:text> of </xsl:text>
1823 <xsl:value-of select="$overload-count"/>
1824 <xsl:text> overloads)</xsl:text>
1825 </xsl:if>
1826 <xsl:text>]&#xd;</xsl:text>
1827 <xsl:if test="$overload-count = 1">
1828 <xsl:text>[indexterm1 </xsl:text>
1829 <xsl:value-of select="$name"/>
1830 <xsl:text>]&#xd;</xsl:text>
1831 </xsl:if>
1832 <xsl:apply-templates select="briefdescription" mode="markup"/>
1833 <xsl:choose>
1834 <xsl:when test="@kind='typedef'">
1835 <xsl:call-template name="typedef">
1836 <xsl:with-param name="class-name" select="$name"/>
1837 </xsl:call-template>
1838 </xsl:when>
1839 <xsl:when test="@kind='variable'">
1840 <xsl:call-template name="variable"/>
1841 </xsl:when>
1842 <xsl:when test="@kind='enum'">
1843 <xsl:call-template name="enum">
1844 <xsl:with-param name="enum-name" select="$name"/>
1845 </xsl:call-template>
1846 </xsl:when>
1847 <xsl:when test="@kind='function'">
1848 <xsl:text>&#xd;```&#xd;</xsl:text>
1849 <xsl:call-template name="function"/>
1850 <xsl:text>&#xd;```&#xd;</xsl:text>
1851 </xsl:when>
1852 </xsl:choose>
1853 <xsl:apply-templates select="detaileddescription" mode="markup"/>
1854 <xsl:if test="$overload-count = 1">
1855 <xsl:call-template name="header-requirements">
1856 <xsl:with-param name="file" select="location/@file"/>
1857 </xsl:call-template>
1858 </xsl:if>
1859 <xsl:choose>
1860 <xsl:when test="$overload-count &gt; 1 and $overload-position = $overload-count">
1861 <xsl:text>[endsect]&#xd;[endsect]&#xd;&#xd;&#xd;&#xd;</xsl:text>
1862 </xsl:when>
1863 <xsl:otherwise>
1864 <xsl:text>[endsect]&#xd;</xsl:text>
1865 </xsl:otherwise>
1866 </xsl:choose>
1867 </xsl:template>
1868
1869 </xsl:stylesheet>