Skip to content

Commit 76bc993

Browse files
committed
friend table templates include qualified name
#feat
1 parent 9ccf054 commit 76bc993

28 files changed

+49
-43
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
| Description
8484
{{#each symbol.friends }}
8585
{{#if symbol}}
86-
| {{#>markup/code}}{{> symbol/name symbol link=symbol }}{{/markup/code}}
86+
| {{#>markup/code}}{{> symbol/qualified-name symbol link=symbol }}{{/markup/code}}
8787
| {{> javadoc/inline-brief symbol.doc.brief }}
8888
{{else}}
8989
| {{#>markup/code}}{{> type/declarator type }}{{/markup/code}}

share/mrdocs/addons/generator/common/partials/symbol/qualified-name.hbs

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,20 @@
1818
See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference
1919
--}}
2020
{{! We remove whitespace between all tag so the result is in a single line ~}}
21-
{{~#if (ne kind "friend")~}}
22-
{{~#if name~}}
23-
{{! General case: linked parent symbols followed by the symbol name ~}}
24-
{{#each parents~}}
25-
{{#if name~}}
26-
{{>symbol/name . link=. nolink=../nolink}}::
27-
{{~/if}}
28-
{{~/each}}{{>symbol/name .}}
29-
{{~else~}}
30-
{{! Unnamed symbol: use the symbol type in the title ~}}
31-
{{~#if parent~}}
32-
{{! Symbol with no name but with a parent ~}}
33-
Unnamed
34-
{{~else~}}
35-
{{! Symbol with no name and no parent: Global symbol ~}}
36-
Global
37-
{{~/if}} {{or tag kind~}}
38-
{{~/if~}}
21+
{{~#if name~}}
22+
{{! General case: linked parent symbols followed by the symbol name ~}}
23+
{{#each parents~}}
24+
{{#if name~}}
25+
{{>symbol/name . link=. nolink=../nolink}}::
26+
{{~/if}}
27+
{{~/each}}{{>symbol/name .}}
3928
{{~else~}}
40-
{{~#if symbol~}}
41-
{{! Friend symbol: use the befriended symbol ~}}
42-
{{>symbol/qualified-name symbol nolink=nolink ~}}
29+
{{! Unnamed symbol: use the symbol type in the title ~}}
30+
{{~#if parent~}}
31+
{{! Symbol with no name but with a parent ~}}
32+
Unnamed
4333
{{~else~}}
44-
{{! Friend type: use the type name ~}}
45-
{{~>type/declarator type ~}}
46-
{{~/if~}}
34+
{{! Symbol with no name and no parent: Global symbol ~}}
35+
Global
36+
{{~/if}} {{or tag kind~}}
4737
{{~/if~}}

test-files/golden-tests/symbols/overloads/overloads-ostream.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class B;
199199
|===
200200
| Name
201201
| Description
202-
| `<<ostream-operator_lshift-0d,operator&lt;&lt;>>`
202+
| `<<ostream,ostream>>::<<ostream-operator_lshift-0d,operator&lt;&lt;>>`
203203
| Stream insertion operator
204204
|===
205205

test-files/golden-tests/symbols/record/friend-2.adoc renamed to test-files/golden-tests/symbols/record/friend-fn-has-docs.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
=== Synopsis
2929

30-
Declared in `&lt;friend&hyphen;2&period;cpp&gt;`
30+
Declared in `&lt;friend&hyphen;fn&hyphen;has&hyphen;docs&period;cpp&gt;`
3131

3232
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
3333
----
@@ -51,7 +51,7 @@ f
5151

5252
=== Synopsis
5353

54-
Declared in `&lt;friend&hyphen;2&period;cpp&gt;`
54+
Declared in `&lt;friend&hyphen;fn&hyphen;has&hyphen;docs&period;cpp&gt;`
5555

5656
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
5757
----
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
struct X
2+
{
3+
X();
4+
~X();
5+
/// Friend member-function
6+
/// @param i
7+
/// @return char*
8+
char* foo(int i);
9+
};
10+
11+
struct U
12+
{
13+
friend X::X();
14+
friend X::~X();
15+
friend char* X::foo(int);
16+
};

test-files/golden-tests/symbols/record/friend-4.adoc renamed to test-files/golden-tests/symbols/record/friend-fn-multi-2nd.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
=== Synopsis
3030

31-
Declared in `&lt;friend&hyphen;4&period;cpp&gt;`
31+
Declared in `&lt;friend&hyphen;fn&hyphen;multi&hyphen;2nd&period;cpp&gt;`
3232

3333
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
3434
----
@@ -50,7 +50,7 @@ struct T;
5050

5151
=== Synopsis
5252

53-
Declared in `&lt;friend&hyphen;4&period;cpp&gt;`
53+
Declared in `&lt;friend&hyphen;fn&hyphen;multi&hyphen;2nd&period;cpp&gt;`
5454

5555
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
5656
----
@@ -74,7 +74,7 @@ U&colon;&colon;f
7474

7575
=== Synopsis
7676

77-
Declared in `&lt;friend&hyphen;4&period;cpp&gt;`
77+
Declared in `&lt;friend&hyphen;fn&hyphen;multi&hyphen;2nd&period;cpp&gt;`
7878

7979
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
8080
----

test-files/golden-tests/symbols/record/friend-5.adoc renamed to test-files/golden-tests/symbols/record/friend-fn-multi-free.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
=== Synopsis
3030

31-
Declared in `&lt;friend&hyphen;5&period;cpp&gt;`
31+
Declared in `&lt;friend&hyphen;fn&hyphen;multi&hyphen;free&period;cpp&gt;`
3232

3333
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
3434
----
@@ -50,7 +50,7 @@ struct T;
5050

5151
=== Synopsis
5252

53-
Declared in `&lt;friend&hyphen;5&period;cpp&gt;`
53+
Declared in `&lt;friend&hyphen;fn&hyphen;multi&hyphen;free&period;cpp&gt;`
5454

5555
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
5656
----
@@ -74,7 +74,7 @@ f
7474

7575
=== Synopsis
7676

77-
Declared in `&lt;friend&hyphen;5&period;cpp&gt;`
77+
Declared in `&lt;friend&hyphen;fn&hyphen;multi&hyphen;free&period;cpp&gt;`
7878

7979
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
8080
----

test-files/golden-tests/symbols/record/friend-3.adoc renamed to test-files/golden-tests/symbols/record/friend-fn-multi.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
=== Synopsis
3030

31-
Declared in `&lt;friend&hyphen;3&period;cpp&gt;`
31+
Declared in `&lt;friend&hyphen;fn&hyphen;multi&period;cpp&gt;`
3232

3333
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
3434
----
@@ -50,7 +50,7 @@ struct T;
5050

5151
=== Synopsis
5252

53-
Declared in `&lt;friend&hyphen;3&period;cpp&gt;`
53+
Declared in `&lt;friend&hyphen;fn&hyphen;multi&period;cpp&gt;`
5454

5555
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
5656
----
@@ -74,7 +74,7 @@ T&colon;&colon;f
7474

7575
=== Synopsis
7676

77-
Declared in `&lt;friend&hyphen;3&period;cpp&gt;`
77+
Declared in `&lt;friend&hyphen;fn&hyphen;multi&period;cpp&gt;`
7878

7979
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
8080
----

test-files/golden-tests/symbols/record/friend-1.adoc renamed to test-files/golden-tests/symbols/record/friend-fn.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
=== Synopsis
2929

30-
Declared in `&lt;friend&hyphen;1&period;cpp&gt;`
30+
Declared in `&lt;friend&hyphen;fn&period;cpp&gt;`
3131

3232
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
3333
----
@@ -51,7 +51,7 @@ f
5151

5252
=== Synopsis
5353

54-
Declared in `&lt;friend&hyphen;1&period;cpp&gt;`
54+
Declared in `&lt;friend&hyphen;fn&period;cpp&gt;`
5555

5656
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
5757
----

test-files/golden-tests/symbols/record/friend-6.adoc renamed to test-files/golden-tests/symbols/record/friend-type.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Struct T brief
2727

2828
=== Synopsis
2929

30-
Declared in `&lt;friend&hyphen;6&period;cpp&gt;`
30+
Declared in `&lt;friend&hyphen;type&period;cpp&gt;`
3131

3232
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
3333
----
@@ -51,7 +51,7 @@ Struct U brief
5151

5252
=== Synopsis
5353

54-
Declared in `&lt;friend&hyphen;6&period;cpp&gt;`
54+
Declared in `&lt;friend&hyphen;type&period;cpp&gt;`
5555

5656
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
5757
----
@@ -75,7 +75,7 @@ Struct V brief
7575

7676
=== Synopsis
7777

78-
Declared in `&lt;friend&hyphen;6&period;cpp&gt;`
78+
Declared in `&lt;friend&hyphen;type&period;cpp&gt;`
7979

8080
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
8181
----
@@ -99,7 +99,7 @@ Friend class Z brief
9999

100100
=== Synopsis
101101

102-
Declared in `&lt;friend&hyphen;6&period;cpp&gt;`
102+
Declared in `&lt;friend&hyphen;type&period;cpp&gt;`
103103

104104
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
105105
----

0 commit comments

Comments
 (0)