Skip to content

Commit d59c28f

Browse files
committed
templates include base classes
#feat
1 parent 572a465 commit d59c28f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2077
-0
lines changed

share/mrdocs/addons/generator/adoc/partials/symbol.adoc.hbs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,20 @@
2828

2929
{{> symbol/signatures symbol }}
3030
{{/unless}}
31+
{{! Base classes }}
32+
{{#if (any_of_by symbol.bases "isPublic")}}
33+
{{#> markup/dynamic-level-h }}Base Classes{{/markup/dynamic-level-h}}
34+
[,cols=2]
35+
|===
36+
| Name
37+
| Description
38+
{{#each (filter_by symbol.bases "isPublic")}}
39+
| {{#>markup/code}}{{> type/declarator type }}{{/markup/code}}
40+
| {{> javadoc/inline-brief symbol.doc.brief }}
41+
{{/each}}
42+
|===
43+
44+
{{/if}}
3145
{{! Members }}
3246
{{! Record interface }}
3347
{{#if (eq symbol.kind "record")}}

share/mrdocs/addons/generator/html/partials/symbol.html.hbs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,25 @@
4040

4141
</div>
4242
{{/unless}}
43+
{{! Base classes }}
44+
{{#if (any_of_by symbol.bases "isPublic")}}
45+
<div>
46+
{{#> markup/dynamic-level-h }}Base Classes{{/markup/dynamic-level-h}}
47+
<table>
48+
<thead>
49+
<tr>
50+
<th>Name</th>
51+
<th>Description</th>
52+
</tr>
53+
</thead>
54+
<tbody>
55+
{{#each (filter_by symbol.bases "isPublic")}}
56+
<tr><td>{{#>markup/code}}{{> type/declarator type }}{{/markup/code}}</td><td>{{> javadoc/inline-brief symbol.doc.brief }}</td></tr>
57+
{{/each}}
58+
</tbody>
59+
</table>
60+
</div>
61+
{{/if}}
4362
{{! Members }}
4463
{{! Record interface }}
4564
{{#if (eq symbol.kind "record")}}

src/lib/Metadata/Info/Record.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,12 @@ tag_invoke(
147147
DomCorpus const* domCorpus)
148148
{
149149
io.map("access", I.Access);
150+
io.map("isPublic", I.Access == AccessKind::Public);
151+
io.map("isProtected", I.Access == AccessKind::Protected);
152+
io.map("isPrivate", I.Access == AccessKind::Private);
150153
io.map("isVirtual", I.IsVirtual);
151154
io.map("type", dom::ValueFrom(I.Type, domCorpus));
155+
io.map("symbol", I.Type->namedSymbol());
152156
}
153157

154158
void

test-files/golden-tests/config/auto-relates/derived.adoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ struct A
5555
: <<ABase,ABase>>;
5656
----
5757

58+
=== Base Classes
59+
60+
[,cols=2]
61+
|===
62+
| Name
63+
| Description
64+
| `<<ABase,ABase>>`
65+
| A base class for non&hyphen;member functions
66+
|===
67+
5868
=== Non-Member Functions
5969

6070
[,cols=2]
@@ -134,6 +144,16 @@ struct AView
134144
: <<ABase,ABase>>;
135145
----
136146

147+
=== Base Classes
148+
149+
[,cols=2]
150+
|===
151+
| Name
152+
| Description
153+
| `<<ABase,ABase>>`
154+
| A base class for non&hyphen;member functions
155+
|===
156+
137157
=== Non-Member Functions
138158

139159
[,cols=2]
@@ -177,6 +197,16 @@ struct AView2
177197
: <<AView,AView>>;
178198
----
179199

200+
=== Base Classes
201+
202+
[,cols=2]
203+
|===
204+
| Name
205+
| Description
206+
| `<<AView,AView>>`
207+
| A view of A
208+
|===
209+
180210
=== Non-Member Functions
181211

182212
[,cols=2]

test-files/golden-tests/config/auto-relates/derived.html

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,20 @@ <h3>Synopsis</h3>
6565
</code>
6666
</pre>
6767
</div>
68+
<div>
69+
<h2>Base Classes</h2>
70+
<table>
71+
<thead>
72+
<tr>
73+
<th>Name</th>
74+
<th>Description</th>
75+
</tr>
76+
</thead>
77+
<tbody>
78+
<tr><td><code><a href="#ABase">ABase</a></code></td><td><span>A base class for non-member functions</span></td></tr>
79+
</tbody>
80+
</table>
81+
</div>
6882

6983

7084
<div>
@@ -162,6 +176,20 @@ <h3>Synopsis</h3>
162176
</code>
163177
</pre>
164178
</div>
179+
<div>
180+
<h2>Base Classes</h2>
181+
<table>
182+
<thead>
183+
<tr>
184+
<th>Name</th>
185+
<th>Description</th>
186+
</tr>
187+
</thead>
188+
<tbody>
189+
<tr><td><code><a href="#ABase">ABase</a></code></td><td><span>A base class for non-member functions</span></td></tr>
190+
</tbody>
191+
</table>
192+
</div>
165193

166194

167195
<div>
@@ -217,6 +245,20 @@ <h3>Synopsis</h3>
217245
</code>
218246
</pre>
219247
</div>
248+
<div>
249+
<h2>Base Classes</h2>
250+
<table>
251+
<thead>
252+
<tr>
253+
<th>Name</th>
254+
<th>Description</th>
255+
</tr>
256+
</thead>
257+
<tbody>
258+
<tr><td><code><a href="#AView">AView</a></code></td><td><span>A view of A</span></td></tr>
259+
</tbody>
260+
</table>
261+
</div>
220262

221263

222264
<div>

test-files/golden-tests/config/extract-implicit-specializations/base.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ struct A
2626
: <<B,B>>;
2727
----
2828

29+
=== Base Classes
30+
31+
[,cols=2]
32+
|===
33+
| Name
34+
| Description
35+
| `<<B,B>>`
36+
|
37+
|===
38+
2939
=== Member Functions
3040

3141
[cols=1]

test-files/golden-tests/config/extract-implicit-specializations/base.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ <h3>Synopsis</h3>
3939
</code>
4040
</pre>
4141
</div>
42+
<div>
43+
<h2>Base Classes</h2>
44+
<table>
45+
<thead>
46+
<tr>
47+
<th>Name</th>
48+
<th>Description</th>
49+
</tr>
50+
</thead>
51+
<tbody>
52+
<tr><td><code><a href="#B">B</a></code></td><td><span></span></td></tr>
53+
</tbody>
54+
</table>
55+
</div>
4256
<h2>Member Functions</h2>
4357
<table style="table-layout: fixed; width: 100%;">
4458
<thead>

test-files/golden-tests/config/extract-implicit-specializations/extract-implicit-specializations.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ struct A
2626
: <<B-00,B>>&lt;int&gt;;
2727
----
2828

29+
=== Base Classes
30+
31+
[,cols=2]
32+
|===
33+
| Name
34+
| Description
35+
| `<<B-00,B>>&lt;int&gt;`
36+
|
37+
|===
38+
2939
=== Member Functions
3040

3141
[cols=1]

test-files/golden-tests/config/extract-implicit-specializations/extract-implicit-specializations.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,20 @@ <h3>Synopsis</h3>
3939
</code>
4040
</pre>
4141
</div>
42+
<div>
43+
<h2>Base Classes</h2>
44+
<table>
45+
<thead>
46+
<tr>
47+
<th>Name</th>
48+
<th>Description</th>
49+
</tr>
50+
</thead>
51+
<tbody>
52+
<tr><td><code><a href="#B-00">B</a>&lt;int&gt;</code></td><td><span></span></td></tr>
53+
</tbody>
54+
</table>
55+
</div>
4256
<h2>Member Functions</h2>
4357
<table style="table-layout: fixed; width: 100%;">
4458
<thead>

test-files/golden-tests/config/extract-implicit-specializations/no-extract-implicit-specializations.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ struct A
2626
: <<B,B>>&lt;int&gt;;
2727
----
2828

29+
=== Base Classes
30+
31+
[,cols=2]
32+
|===
33+
| Name
34+
| Description
35+
| `<<B,B>>&lt;int&gt;`
36+
|
37+
|===
38+
2939
=== Member Functions
3040

3141
[cols=1]

0 commit comments

Comments
 (0)