Skip to content

Commit 0823b48

Browse files
committed
refactor: synchronize HTML templates
1 parent e052cb7 commit 0823b48

File tree

281 files changed

+18550
-3860
lines changed

Some content is hidden

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

281 files changed

+18550
-3860
lines changed

docs/modules/ROOT/pages/generators.adoc

+12-5
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,28 @@ The templates used to generate the documentation are located in the `share/mrdoc
4747
addons: /path/to/custom/addons
4848
----
4949

50-
Each symbol goes through a main layout template in the `share/mrdocs/addons/generator/<generator>/layouts/single-symbol.<generator>.hbs` directory.
50+
Each symbol goes through a main layout template in the `share/mrdocs/addons/generator/<generator>/layouts/single-symbol.<generator>.hbs` directory. This template is a simple entry point that renders the partial relative to the symbol kind.
51+
52+
The partials are located in the `share/mrdocs/addons/generator/<generator>/partials` directory. It contains the following subdirectories:
53+
54+
* `symbols`: Contains one partial for each symbol kind. The fields of each symbol object are described in the <<symbol-fields,Symbol Object>> section.
55+
* `signature`: Contains one partial for each symbol kind that renders the signature of the symbol as if declared in {cpp}.
56+
* `types`: partials for rendering other types of objects in a canonical form. Please refer to the <<dom_reference,Document Object Model Reference>> for more information on each type of object.
5157

5258
The multipage generator renders the layout multiple times as separate pages for each symbol. The single-page generator renders the layout multiple times and concatenates the results in a single page.
5359

54-
Each time the generator encounters a symbol, it renders the layout template with the symbol data as the Handlebars context. The layout template can include other partial templates to render the symbol data. These partials are available in the `share/mrdocs/addons/generator/<generator>/partials` directory.
60+
Each time the generator encounters a symbol, it renders the layout template with the symbol data as the Handlebars context.The layout template can include other partial templates to render the symbol data.These partials are available in the `share/mrdocs/addons/generator/<generator>/partials` directory.
5561

56-
The Document Object Model (DOM) for each symbol includes all information about the symbol. One advantage of custom templates over post-processing XML files is the ability to access symbols as a graph. If symbol `A` refers to symbol `B`, some properties of symbol `B` are likely to be required in the documentation of `A`. All templates and generators can access a reference to `B` by searching the symbol tree or simply by accessing the elements `A` refers to. All references to other symbols are resolved in the templates.
62+
The Document Object Model (DOM) for each symbol includes all information about the symbol.One advantage of custom templates over post-processing XML files is the ability to access symbols as a graph.If symbol `A` refers to symbol `B`, some properties of symbol `B` are likely to be required in the documentation of `A`.All templates and generators can access a reference to `B` by searching the symbol tree or simply by accessing the elements `A` refers to.All references to other symbols are resolved in the templates.
5763

64+
[#dom_reference]
5865
== Document Object Model Reference
5966

60-
The Document Object Model (DOM) is a tree structure that represents the symbols extracted from the source code. The DOM is used by the generator to render the documentation.
67+
The Document Object Model (DOM) is a tree structure that represents the symbols extracted from the source code.The DOM is used by the generator to render the documentation.
6168

6269
=== Top-Level Fields
6370

64-
The top-level object in the DOM is the context for a template. The top-level object has the following properties:
71+
The top-level object in the DOM is the context for a template.The top-level object has the following properties:
6572

6673
|===
6774
|Property |Type| Description

share/mrdocs/addons/generator/README.adoc

-3
This file was deleted.

share/mrdocs/addons/generator/asciidoc/README.adoc

-4
This file was deleted.

share/mrdocs/addons/generator/asciidoc/layouts/overload-set.adoc.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{#if relfileprefix}}:relfileprefix: {{relfileprefix}}{{/if}}
33
[#{{sectionref}}]
44

5-
={{#unless is_multipage}}={{/unless}} {{#if symbol.name}}{{>nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}Unnamed overload set{{/if}}
5+
={{#unless is_multipage}}={{/unless}} {{#if symbol.name}}{{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}Unnamed overload set{{/if}}
66

77
{{#if symbol.members.[0]}}
88

share/mrdocs/addons/generator/asciidoc/partials/declarator-before.adoc.hbs

-17
This file was deleted.

share/mrdocs/addons/generator/asciidoc/partials/declarator.adoc.hbs

-5
This file was deleted.

share/mrdocs/addons/generator/asciidoc/partials/info-member.adoc.hbs

-8
This file was deleted.

share/mrdocs/addons/generator/asciidoc/partials/nested-name-specifier.adoc.hbs

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
namespace {{symbol.name}} = {{>name-info symbol.aliasedSymbol}}
1+
namespace {{symbol.name}} = {{>types/name-info symbol.aliasedSymbol}}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{{>template-head symbol.template}}
1+
{{>types/template-head symbol.template}}
22

3-
concept {{>declarator-id symbol}} = {{symbol.constraint}}
3+
concept {{>types/declarator-id symbol}} = {{symbol.constraint}}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
enum {{>declarator-id symbol~}}
2-
{{#if symbol.type}} : {{>declarator symbol.type}}{{/if}}
1+
enum {{>types/declarator-id symbol~}}
2+
{{#if symbol.type}} : {{>types/declarator symbol.type}}{{/if}}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{#if symbol.isMutable}}mutable
22
{{/if~}}
3-
{{>declarator-before symbol.type}} {{>declarator-id symbol~}}
3+
{{>types/declarator-before symbol.type}} {{>types/declarator-id symbol~}}
44
{{#if symbol.isBitfield}} : {{symbol.bitfieldWidth}}{{/if~}}
55
{{#if symbol.default}} = {{symbol.default}}{{/if~}}
6-
{{>declarator-after symbol.type}}
6+
{{>types/declarator-after symbol.type}}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{#if symbol.type~}}
2-
friend {{>declarator symbol.type~}}
2+
friend {{>types/declarator symbol.type~}}
33
{{else if symbol.symbol~}}
44
{{> (concat 'signature' '/' (lookup . 'symbol.symbol.kind')) symbol=symbol.symbol isFriend=true~}}
55
{{/if}}

share/mrdocs/addons/generator/asciidoc/partials/signature/function.adoc.hbs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{#if symbol.template}}{{>template-head symbol.template}}
1+
{{#if symbol.template}}{{>types/template-head symbol.template}}
22
{{/if~}}
33
{{#if isFriend}}friend
44
{{/if~}}
@@ -10,19 +10,19 @@
1010
{{/if~}}
1111
{{#if symbol.explicitSpec}}{{symbol.explicitSpec}}
1212
{{/if~}}
13-
{{#if (eq symbol.class "normal")}}{{>declarator-before symbol.return}}
13+
{{#if (eq symbol.class "normal")}}{{>types/declarator-before symbol.return}}
1414
{{/if~}}
15-
{{>declarator-id symbol link=(select link link symbol.template.primary)}}
15+
{{>types/declarator-id symbol link=(select link link symbol.template.primary)}}
1616
({{#if symbol.isExplicitObjectMemberFunction}}this {{/if}}{{#each symbol.params}}{{#unless (and @first @last)}}
17-
{{/unless}}{{>declarator type decl-name=name~}}
17+
{{/unless}}{{>types/declarator type decl-name=name~}}
1818
{{#if default}} = {{default}}{{/if~}}
1919
{{#unless @last}},{{/unless~}}
2020
{{/each~}}{{#if symbol.isVariadic}}{{#if symbol.params}}, {{/if}}...{{/if}})
2121
{{~#if symbol.isConst}} const{{/if~}}
2222
{{#if symbol.isVolatile}} volatile{{/if~}}
2323
{{#if symbol.refQualifier}} {{symbol.refQualifier}}{{/if~}}
2424
{{#if symbol.exceptionSpec}} {{symbol.exceptionSpec}}{{/if~}}
25-
{{#if (eq symbol.class "normal")}}{{>declarator-after symbol.return}}{{/if~}}
25+
{{#if (eq symbol.class "normal")}}{{>types/declarator-after symbol.return}}{{/if~}}
2626
{{#if symbol.requires}} requires {{symbol.requires}}{{/if~}}
2727
{{#if symbol.hasOverrideAttr}} override{{/if~}}
2828
{{#if symbol.isFinal}} final{{/if~}}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{{#if symbol.template}}{{>template-head symbol.template}}
1+
{{#if symbol.template}}{{>types/template-head symbol.template}}
22
{{/if~}}
3-
{{>declarator-id symbol}}
3+
{{>types/declarator-id symbol}}
44
({{#each symbol.params}}{{#unless (and @first @last)}}
5-
{{/unless}}{{>declarator type decl-name=name~}}
5+
{{/unless}}{{>types/declarator type decl-name=name~}}
66
{{#if default}} = {{default}}{{/if~}}
77
{{#unless @last}},{{/unless~}}
8-
{{/each~}}) -> {{>declarator symbol.deduced}}
8+
{{/each~}}) -> {{>types/declarator symbol.deduced}}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{{#if symbol.template}}{{>template-head symbol.template}}
1+
{{#if symbol.template}}{{>types/template-head symbol.template}}
22
{{/if~}}
3-
{{#if isFriend}}friend {{/if}}{{symbol.tag}} {{>declarator-id symbol link=(select link link symbol.template.primary)~}}
3+
{{#if isFriend}}friend {{/if}}{{symbol.tag}} {{>types/declarator-id symbol link=(select link link symbol.template.primary)~}}
44
{{#unless symbol.bases~}}
55
{{else if isFriend~}}
66
{{else}}
@@ -10,6 +10,6 @@
1010
:{{else}}
1111
,{{/if~}}
1212
{{#unless (eq access ../symbol.defaultAccess)}} {{access}}{{/unless~}}
13-
{{#if isVirtual}} virtual{{/if}} {{>declarator type~}}
13+
{{#if isVirtual}} virtual{{/if}} {{>types/declarator type~}}
1414
{{/each~}}
1515
{{/unless}}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{#if symbol.isUsing~}}
2-
{{#if symbol.template}}{{>template-head symbol.template}}
2+
{{#if symbol.template}}{{>types/template-head symbol.template}}
33
{{/if~}}
4-
using {{symbol.name}} = {{>declarator symbol.type}}
4+
using {{symbol.name}} = {{>types/declarator symbol.type}}
55
{{~else~}}
6-
typedef {{>declarator symbol.type decl-name=symbol.name}}
6+
typedef {{>types/declarator symbol.type decl-name=symbol.name}}
77
{{~/if}}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
using {{#if (eq symbol.class "typename")}}typename {{/if}}{{#if (eq symbol.class "enum")}}enum {{/if}}{{#if symbol.qualifier}}{{>name-info symbol.qualifier}}::{{/if}}{{symbol.name~}}
1+
using {{#if (eq symbol.class "typename")}}typename {{/if}}{{#if (eq symbol.class "enum")}}enum {{/if}}{{#if symbol.qualifier}}{{>types/name-info symbol.qualifier}}::{{/if}}{{symbol.name~}}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
{{#if symbol.template}}{{>template-head symbol.template}}
1+
{{#if symbol.template}}{{>types/template-head symbol.template}}
22
{{/if~}}
33
{{#if symbol.constexprKind}}{{symbol.constexprKind}}
44
{{/if~}}
55
{{#if symbol.storageClass}}{{symbol.storageClass}}
66
{{/if~}}
77
{{#if symbol.isThreadLocal}}thread_local
88
{{/if~}}
9-
{{>declarator-before symbol.type}} {{>declarator-id symbol link=(select link link symbol.template.primary)~}}
10-
{{>declarator-after symbol.type~}}
9+
{{>types/declarator-before symbol.type}} {{>types/declarator-id symbol link=(select link link symbol.template.primary)~}}
10+
{{>types/declarator-after symbol.type~}}
1111
{{#if symbol.initializer}} = {{symbol.initializer}}{{/if}}

share/mrdocs/addons/generator/asciidoc/partials/source.adoc.hbs

-1
This file was deleted.

share/mrdocs/addons/generator/asciidoc/partials/symbols/alias.adoc.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{{!-- alias --}}
2-
={{#unless is_multipage}}={{/unless}} {{>nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}
2+
={{#unless is_multipage}}={{/unless}} {{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}
33

44
{{symbol.doc.brief}}
55

66
=={{#unless is_multipage}}={{/unless}} Synopsis
77

8-
{{>source dcl=(primary_location symbol)}}
8+
{{>types/source dcl=(primary_location symbol)}}
99

1010
[source,cpp,subs="verbatim,macros,-callouts"]
1111
----

share/mrdocs/addons/generator/asciidoc/partials/symbols/concept.adoc.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{{!-- concept --}}
2-
= {{>nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}
2+
= {{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}
33

44
{{symbol.doc.brief}}
55

66
== Synopsis
77

8-
{{>source dcl=(primary_location symbol)}}
8+
{{>types/source dcl=(primary_location symbol)}}
99

1010
[source,cpp,subs="verbatim,macros,-callouts"]
1111
----

share/mrdocs/addons/generator/asciidoc/partials/symbols/enum.adoc.hbs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{{!-- enum --}}
2-
={{#unless is_multipage}}={{/unless}} {{#if symbol.name}}{{>nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}Unnamed enum{{/if}}
2+
={{#unless is_multipage}}={{/unless}} {{#if symbol.name}}{{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}Unnamed enum{{/if}}
33

44
{{symbol.doc.brief}}
55

66
=={{#unless is_multipage}}={{/unless}} Synopsis
77

8-
{{>source dcl=(primary_location symbol)}}
8+
{{>types/source dcl=(primary_location symbol)}}
99

1010
[source,cpp,subs="verbatim,macros,-callouts"]
1111
----
@@ -18,7 +18,7 @@
1818
|===
1919
|Name |Description
2020
{{#each symbol.members}}
21-
|xref:{{ref}}[`pass:v[{{>declarator-id . nolink=true}}]`] | {{~doc.brief}}
21+
|xref:{{ref}}[`pass:v[{{>types/declarator-id . nolink=true}}]`] | {{~doc.brief}}
2222
{{/each}}
2323
|===
2424
{{/if}}

share/mrdocs/addons/generator/asciidoc/partials/symbols/enumerator.adoc.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{{!-- enumerator --}}
2-
={{#unless is_multipage}}={{/unless}} {{>nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}
2+
={{#unless is_multipage}}={{/unless}} {{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}
33

44
{{symbol.doc.brief}}
55

66
=={{#unless is_multipage}}={{/unless}} Synopsis
77

8-
{{>source dcl=(primary_location symbol)}}
8+
{{>types/source dcl=(primary_location symbol)}}
99

1010
[source,cpp,subs="verbatim,macros,-callouts"]
1111
----

share/mrdocs/addons/generator/asciidoc/partials/symbols/field.adoc.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{{!-- field --}}
2-
={{#unless is_multipage}}={{/unless}} {{>nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}
2+
={{#unless is_multipage}}={{/unless}} {{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}
33

44
{{symbol.doc.brief}}
55

66
=={{#unless is_multipage}}={{/unless}} Synopsis
77

8-
{{>source dcl=(primary_location symbol)}}
8+
{{>types/source dcl=(primary_location symbol)}}
99

1010
[source,cpp,subs="verbatim,macros,-callouts"]
1111
----

share/mrdocs/addons/generator/asciidoc/partials/symbols/friend.adoc.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{{!-- friend --}}
2-
={{#unless is_multipage}}={{/unless}} {{#if symbol.symbol}}{{>nested-name-specifier symbol=symbol.symbol.parent includeNamespace=true}}{{symbol.symbol.name}}{{else}}{{symbol.type.name}}{{/if}}
2+
={{#unless is_multipage}}={{/unless}} {{#if symbol.symbol}}{{>types/nested-name-specifier symbol=symbol.symbol.parent includeNamespace=true}}{{symbol.symbol.name}}{{else}}{{symbol.type.name}}{{/if}}
33

44
{{symbol.doc.brief}}
55

66
=={{#unless is_multipage}}={{/unless}} Synopsis
77

8-
{{>source dcl=(primary_location symbol)}}
8+
{{>types/source dcl=(primary_location symbol)}}
99

1010
[source,cpp,subs="verbatim,macros,-callouts"]
1111
----

share/mrdocs/addons/generator/asciidoc/partials/symbols/function.adoc.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{{!-- function --}}
2-
={{#unless is_multipage}}={{/unless}} {{>nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}
2+
={{#unless is_multipage}}={{/unless}} {{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}
33

44
{{symbol.doc.brief}}
55

66
=={{#unless is_multipage}}={{/unless}} Synopsis
77

8-
{{>source dcl=(primary_location symbol)}}
8+
{{>types/source dcl=(primary_location symbol)}}
99

1010
[source,cpp,subs="verbatim,macros,-callouts"]
1111
----

share/mrdocs/addons/generator/asciidoc/partials/symbols/guide.adoc.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{{!-- guides --}}
2-
={{#unless is_multipage}}={{/unless}} {{>nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}
2+
={{#unless is_multipage}}={{/unless}} {{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}
33

44
{{symbol.doc.brief}}
55

66
=={{#unless is_multipage}}={{/unless}} Synopsis
77

8-
{{>source dcl=(primary_location symbol)}}
8+
{{>types/source dcl=(primary_location symbol)}}
99

1010
[source,cpp,subs="verbatim,macros,-callouts"]
1111
----
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{!-- namespace --}}
2-
={{#unless is_multipage}}={{/unless}} {{#if symbol.name}}{{>nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else if symbol.parent}}Unnamed namespace{{else}}Global namespace{{/if}}
2+
={{#unless is_multipage}}={{/unless}} {{#if symbol.name}}{{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else if symbol.parent}}Unnamed namespace{{else}}Global namespace{{/if}}
33

4-
{{> tranche tranche=symbol.interface label="" is-namespace=true}}
4+
{{>types/tranche tranche=symbol.interface label="" is-namespace=true}}
55

6-
{{>info-list members=symbol.usingDirectives title="Using Directives"}}
6+
{{>types/info-list members=symbol.usingDirectives title="Using Directives"}}

share/mrdocs/addons/generator/asciidoc/partials/symbols/record.adoc.hbs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{{!-- record --}}
2-
={{#unless is_multipage}}={{/unless}} {{#if symbol.name}}{{>nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}Unnamed class{{/if}}
2+
={{#unless is_multipage}}={{/unless}} {{#if symbol.name}}{{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}Unnamed class{{/if}}
33

44
{{symbol.doc.brief}}
55

66
=={{#unless is_multipage}}={{/unless}} Synopsis
77

8-
{{>source dcl=(primary_location symbol)}}
8+
{{>types/source dcl=(primary_location symbol)}}
99

1010
[source,cpp,subs="verbatim,macros,-callouts"]
1111
----
1212
{{>signature/record symbol=symbol}};
1313
----
1414
1515
{{#with symbol.interface}}
16-
{{> tranche tranche=public label="" is-namespace=false}}
17-
{{> tranche tranche=protected label="Protected" is-namespace=false}}
18-
{{> tranche tranche=private label="Private" is-namespace=false}}
16+
{{>types/tranche tranche=public label="" is-namespace=false}}
17+
{{>types/tranche tranche=protected label="Protected" is-namespace=false}}
18+
{{>types/tranche tranche=private label="Private" is-namespace=false}}
1919
{{/with}}
2020
2121
{{#if symbol.doc.description}}

0 commit comments

Comments
 (0)