diff --git a/share/mrdocs/addons/generator/asciidoc/layouts/overload-set.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/layouts/overload-set.adoc.hbs index 62d62165d..3615a8218 100644 --- a/share/mrdocs/addons/generator/asciidoc/layouts/overload-set.adoc.hbs +++ b/share/mrdocs/addons/generator/asciidoc/layouts/overload-set.adoc.hbs @@ -1,15 +1,16 @@ {{#if relfileprefix}}:relfileprefix: {{relfileprefix}}{{/if}} -{{#with symbol}} -[#{{#if (is_multipage)}}{{id}}{{else}}{{ref}}{{/if}}] +[#{{#if (is_multipage)}}{{symbol.id}}{{else}}{{symbol.ref}}{{/if}}] -== {{#if name}}Overload set {{name}}{{else}}Unnamed overload set{{/if}} +== {{#if symbol.name}}Overload set {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}}{{else}}Unnamed overload set{{/if}} -[,cols=2] -|=== -|Name |Description -{{#each members}} -|xref:{{ref}}[`pass:v[{{name}}]`] |{{doc.brief}} -{{/each}} -|=== +{{#each symbol.members as | member |}} -{{/with}} +{{member.doc.brief}} + +[source,cpp,subs="verbatim,macros,-callouts"] +---- +{{> (concat 'signature' '/' (lookup member 'kind')) symbol=member}}; + xref:{{ref}}[pass:c,q,m[*_ยป more..._*]] +---- + +{{/each}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/layouts/single-symbol.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/layouts/single-symbol.adoc.hbs index 21197f7f5..b07821eca 100644 --- a/share/mrdocs/addons/generator/asciidoc/layouts/single-symbol.adoc.hbs +++ b/share/mrdocs/addons/generator/asciidoc/layouts/single-symbol.adoc.hbs @@ -1,5 +1,4 @@ {{#if relfileprefix}}:relfileprefix: {{relfileprefix}}{{/if}} -{{#with symbol}} -[#{{#if (is_multipage)}}{{id}}{{else}}{{ref}}{{/if}}] -{{> (lookup . 'kind') symbol=.}} -{{/with}} \ No newline at end of file +[#{{#if (is_multipage)}}{{symbol.id}}{{else}}{{symbol.ref}}{{/if}}] + +{{> (concat 'symbols' '/' (lookup symbol 'kind')) symbol=symbol}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/declarator-id.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/declarator-id.adoc.hbs new file mode 100644 index 000000000..2bbca8020 --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/declarator-id.adoc.hbs @@ -0,0 +1,8 @@ +{{#if (and (eq kind "function") (eq class "conversion"))~}} + operator {{>declarator return~}} +{{else~}} + {{#if link.ref}}xref:{{link.ref}}[{{name}}]{{else}}{{name}}{{/if~}} + {{#if (or (eq template.kind "explicit") (eq template.kind "partial"))~}} + {{>template-args args=template.args~}} + {{/if~}} +{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/function-decl.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/function-decl.adoc.hbs deleted file mode 100644 index 9d33cdf23..000000000 --- a/share/mrdocs/addons/generator/asciidoc/partials/function-decl.adoc.hbs +++ /dev/null @@ -1,44 +0,0 @@ -[source,cpp,subs="verbatim,macros,-callouts"] ----- -{{#if template}}{{>template-head template}} -{{/if~}} -{{#if isFriend}}friend -{{/if~}} -{{#if constexprKind}}{{constexprKind}} -{{/if~}} -{{#if storageClass}}{{storageClass}} -{{/if~}} -{{#if isVirtual}}virtual -{{/if~}} - -{{#if (eq class "normal")~}} -{{>declarator-before return}} - -{{#if (eq template.kind "explicit")~}} - {{#if template.primary.id~}}xref:{{template.primary.ref}}[{{name}}]{{else}}{{name}}{{/if~}} - {{~>template-args args=template.args~}} -{{else~}} - {{name~}} -{{/if~}} -{{else if (ne class "conversion")~}} -{{name~}} -{{else~}} -operator {{>declarator return~}} -{{/if}} -({{#each params}}{{#unless (and @first @last)}} - {{/unless}}{{>declarator type decl-name=name~}} - {{#if default}} = {{default}}{{/if~}} - {{#unless @last}},{{/unless~}} -{{/each~}}) -{{~#if isConst}} const{{/if~}} -{{#if isVolatile}} volatile{{/if~}} -{{#if refQualifier}} {{refQualifier}}{{/if~}} -{{#if (eq exceptionSpec "noexcept")}} noexcept{{/if~}} -{{#if (eq class "normal")}}{{>declarator-after return}}{{/if~}} -{{#if hasOverrideAttr}} override{{/if~}} -{{#if isFinal}} final{{/if~}} -{{#if isPure}} = 0{{/if~}} -{{#if isDeleted}} = delete{{/if~}} -{{#if isDefaulted}} = default{{/if~}} -; ----- diff --git a/share/mrdocs/addons/generator/asciidoc/partials/nested-name-specifier.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/nested-name-specifier.adoc.hbs new file mode 100644 index 000000000..271e8111d --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/nested-name-specifier.adoc.hbs @@ -0,0 +1,8 @@ +{{#if (and symbol (or includeNamespace (ne symbol.kind "namespace")))~}} +{{#if symbol.parent~}} +{{>nested-name-specifier symbol=symbol.parent~}} +{{else~}} +{{/if~}} +{{!-- {{#if symbol.name}}xref:{{symbol.ref}}[{{symbol.name}}]::{{/if~}} --}} +{{#if symbol.name}}{{symbol.name}}::{{/if~}} +{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/record-decl.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/record-decl.adoc.hbs deleted file mode 100644 index 641d5ab31..000000000 --- a/share/mrdocs/addons/generator/asciidoc/partials/record-decl.adoc.hbs +++ /dev/null @@ -1,27 +0,0 @@ -[source,cpp,subs="verbatim,macros,-callouts"] ----- -{{#if template}}{{>template-head template}} -{{/if~}} -{{#if (or (eq template.kind "explicit") (eq template.kind "partial"))~}} - {{#if isFriend}}friend {{/if~}} - {{tag}} {{#if template.primary.id~}}xref:{{template.primary.ref}}[{{name}}]{{else}}{{name}}{{/if~}} - {{~>template-args args=template.args~}} -{{else~}} - {{#if isFriend}}friend {{/if~}} - {{tag}} {{name~}} -{{/if~}} -{{#unless bases}} -; -{{else if isFriend}} -; -{{else}} - -{{#each bases}} - {{#if @first}}:{{else}},{{/if}} - {{~#unless (eq access ../defaultAccess)}} {{access}}{{/unless}} - {{~#if isVirtual}} virtual{{/if}} - {{~null}} {{>declarator type}} - {{~#if @last}};{{/if}} -{{/each}} -{{/unless}} ----- diff --git a/share/mrdocs/addons/generator/asciidoc/partials/signature/enum.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/signature/enum.adoc.hbs new file mode 100644 index 000000000..0192f2301 --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/signature/enum.adoc.hbs @@ -0,0 +1,2 @@ +enum {{>declarator-id symbol~}} +{{#if symbol.type}} : {{>declarator symbol.type}}{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/signature/enumerator.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/signature/enumerator.adoc.hbs new file mode 100644 index 000000000..e223c917b --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/signature/enumerator.adoc.hbs @@ -0,0 +1 @@ +{{symbol.name}}{{#if symbol.initializer}} = {{symbol.initializer}}{{~/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/signature/field.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/signature/field.adoc.hbs new file mode 100644 index 000000000..25604b595 --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/signature/field.adoc.hbs @@ -0,0 +1,5 @@ +{{#if symbol.isMutable}}mutable +{{/if~}} +{{>declarator-before symbol.type}} {{>declarator-id symbol~}} +{{#if symbol.isBitfield}} : {{symbol.bitfieldWidth}}{{/if~}} +{{>declarator-after symbol.type}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/signature/friend.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/signature/friend.adoc.hbs new file mode 100644 index 000000000..17e146df9 --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/signature/friend.adoc.hbs @@ -0,0 +1,5 @@ +{{#if symbol.type~}} +friend {{>declarator symbol.type~}} +{{else if symbol.symbol~}} +{{> (concat 'signature' '/' (lookup . 'symbol.symbol.kind')) symbol=symbol.symbol isFriend=true~}} +{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/signature/function.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/signature/function.adoc.hbs new file mode 100644 index 000000000..ea0b18f9c --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/signature/function.adoc.hbs @@ -0,0 +1,28 @@ +{{#if symbol.template}}{{>template-head symbol.template}} +{{/if~}} +{{#if isFriend}}friend +{{/if~}} +{{#if symbol.constexprKind}}{{symbol.constexprKind}} +{{/if~}} +{{#if symbol.storageClass}}{{symbol.storageClass}} +{{/if~}} +{{#if symbol.isVirtual}}virtual +{{/if~}} +{{#if (eq symbol.class "normal")}}{{>declarator-before symbol.return}} +{{/if~}} +{{>declarator-id symbol link=symbol.template.primary}} +({{#each symbol.params}}{{#unless (and @first @last)}} + {{/unless}}{{>declarator type decl-name=name~}} + {{#if default}} = {{default}}{{/if~}} + {{#unless @last}},{{/unless~}} +{{/each~}}) +{{~#if symbol.isConst}} const{{/if~}} +{{#if symbol.isVolatile}} volatile{{/if~}} +{{#if symbol.refQualifier}} {{symbol.refQualifier}}{{/if~}} +{{#if (eq symbol.exceptionSpec "noexcept")}} noexcept{{/if~}} +{{#if (eq symbol.class "normal")}}{{>declarator-after symbol.return}}{{/if~}} +{{#if symbol.hasOverrideAttr}} override{{/if~}} +{{#if symbol.isFinal}} final{{/if~}} +{{#if symbol.isPure}} = 0{{/if~}} +{{#if symbol.isDeleted}} = delete{{/if~}} +{{#if symbol.isDefaulted}} = default{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/signature/namespace.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/signature/namespace.adoc.hbs new file mode 100644 index 000000000..a58affd9f --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/signature/namespace.adoc.hbs @@ -0,0 +1 @@ +{{!-- namespace --}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/signature/record.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/signature/record.adoc.hbs new file mode 100644 index 000000000..83195c9b8 --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/signature/record.adoc.hbs @@ -0,0 +1,15 @@ +{{#if symbol.template}}{{>template-head symbol.template}} +{{/if~}} +{{#if isFriend}}friend {{/if}}{{symbol.tag}} {{>declarator-id symbol link=symbol.template.primary~}} +{{#unless symbol.bases~}} +{{else if isFriend~}} +{{else}} + +{{#each symbol.bases~}} + {{#if @first}} + :{{else}} + ,{{/if~}} + {{#unless (eq access ../symbol.defaultAccess)}} {{access}}{{/unless~}} + {{#if isVirtual}} virtual{{/if}} {{>declarator type~}} +{{/each~}} +{{/unless}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/signature/specialization.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/signature/specialization.adoc.hbs new file mode 100644 index 000000000..f94caae56 --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/signature/specialization.adoc.hbs @@ -0,0 +1 @@ +{{!-- specialization --}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/signature/typedef.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/signature/typedef.adoc.hbs new file mode 100644 index 000000000..debd0e1e4 --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/signature/typedef.adoc.hbs @@ -0,0 +1,7 @@ +{{#if symbol.isUsing~}} + {{#if symbol.template}}{{>template-head symbol.template}} + {{/if~}} + using {{symbol.name}} = {{>declarator symbol.type}} +{{~else~}} + typedef {{>declarator symbol.type decl-name=symbol.name}} +{{~/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/signature/undefined.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/signature/undefined.adoc.hbs new file mode 100644 index 000000000..c1fbd0783 --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/signature/undefined.adoc.hbs @@ -0,0 +1 @@ +{{!-- undefined --}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/signature/variable.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/signature/variable.adoc.hbs new file mode 100644 index 000000000..903a44df9 --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/signature/variable.adoc.hbs @@ -0,0 +1,10 @@ +{{#if symbol.template}}{{>template-head symbol.template}} +{{/if~}} +{{#if symbol.constexprKind}}{{symbol.constexprKind}} +{{/if~}} +{{#if symbol.storageClass}}{{symbol.storageClass}} +{{/if~}} +{{#if symbol.isThreadLocal}}thread_local +{{/if~}} +{{>declarator-before symbol.type}} {{>declarator-id symbol link=symbol.template.primary~}} +{{>declarator-after symbol.type}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/asciidoc/partials/enum.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/enum.adoc.hbs similarity index 71% rename from share/mrdocs/addons/generator/asciidoc/partials/enum.adoc.hbs rename to share/mrdocs/addons/generator/asciidoc/partials/symbols/enum.adoc.hbs index af05626c2..37b6102da 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/enum.adoc.hbs +++ b/share/mrdocs/addons/generator/asciidoc/partials/symbols/enum.adoc.hbs @@ -1,5 +1,5 @@ {{!-- enum --}} -= {{#if symbol.name}}Enum {{symbol.name}}{{else}}Unnamed enum{{/if}} += {{#if symbol.name}}Enum {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}}{{else}}Unnamed enum{{/if}} {{symbol.doc.brief}} @@ -9,7 +9,7 @@ [source,cpp,subs="verbatim,macros,-callouts"] ---- -enum {{symbol.name}}; +{{>signature/enum symbol=symbol}}; ---- {{#if symbol.members}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/enumerator.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/enumerator.adoc.hbs similarity index 69% rename from share/mrdocs/addons/generator/asciidoc/partials/enumerator.adoc.hbs rename to share/mrdocs/addons/generator/asciidoc/partials/symbols/enumerator.adoc.hbs index 31989febc..08a113038 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/enumerator.adoc.hbs +++ b/share/mrdocs/addons/generator/asciidoc/partials/symbols/enumerator.adoc.hbs @@ -1,5 +1,5 @@ {{!-- enumerator --}} -= {{symbol.name}} += {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}} {{symbol.doc.brief}} @@ -9,7 +9,7 @@ [source,cpp,subs="verbatim,macros,-callouts"] ---- -{{symbol.name}}{{#if symbol.initializer}} = {{symbol.initializer}}{{~/if}} +{{>signature/enumerator symbol=symbol}}; ---- {{#if symbol.doc.description}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/field.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/field.adoc.hbs similarity index 53% rename from share/mrdocs/addons/generator/asciidoc/partials/field.adoc.hbs rename to share/mrdocs/addons/generator/asciidoc/partials/symbols/field.adoc.hbs index 5556e0d13..bed27ed03 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/field.adoc.hbs +++ b/share/mrdocs/addons/generator/asciidoc/partials/symbols/field.adoc.hbs @@ -1,5 +1,5 @@ {{!-- field --}} -= {{symbol.name}} += {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}} {{symbol.doc.brief}} @@ -9,12 +9,7 @@ [source,cpp,subs="verbatim,macros,-callouts"] ---- -{{#if symbol.isMutable}}mutable -{{/if~}} -{{>declarator-before symbol.type}} {{symbol.name~}} -{{#if symbol.isBitfield}} : {{symbol.bitfieldWidth}}{{/if~}} -{{>declarator-after symbol.type~}} -; +{{>signature/field symbol=symbol}}; ---- {{#if symbol.doc.description}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/friend.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/friend.adoc.hbs similarity index 52% rename from share/mrdocs/addons/generator/asciidoc/partials/friend.adoc.hbs rename to share/mrdocs/addons/generator/asciidoc/partials/symbols/friend.adoc.hbs index 9d3ba01c8..4757ed05b 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/friend.adoc.hbs +++ b/share/mrdocs/addons/generator/asciidoc/partials/symbols/friend.adoc.hbs @@ -7,16 +7,10 @@ {{>source dcl=(primary_location symbol)}} -{{#if symbol.type~}} [source,cpp,subs="verbatim,macros,-callouts"] ---- -friend {{>declarator symbol.type}}; +{{>signature/friend symbol=symbol}}; ---- -{{else if (and symbol.symbol (eq symbol.symbol.kind "record"))~}} -{{>record-decl symbol.symbol isFriend=true~}} -{{else if (and symbol.symbol (eq symbol.symbol.kind "function"))~}} -{{>function-decl symbol.symbol isFriend=true~}} -{{/if}} {{#if symbol.doc.description}} == Description diff --git a/share/mrdocs/addons/generator/asciidoc/partials/function.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/function.adoc.hbs similarity index 77% rename from share/mrdocs/addons/generator/asciidoc/partials/function.adoc.hbs rename to share/mrdocs/addons/generator/asciidoc/partials/symbols/function.adoc.hbs index a08b333b5..cf8227247 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/function.adoc.hbs +++ b/share/mrdocs/addons/generator/asciidoc/partials/symbols/function.adoc.hbs @@ -1,5 +1,5 @@ {{!-- function --}} -= {{symbol.name}} += {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}} {{symbol.doc.brief}} @@ -7,7 +7,10 @@ {{>source dcl=(primary_location symbol)}} -{{>function-decl symbol isFriend=false}} +[source,cpp,subs="verbatim,macros,-callouts"] +---- +{{>signature/function symbol=symbol}}; +---- {{#if symbol.doc.description}} == Description diff --git a/share/mrdocs/addons/generator/asciidoc/partials/namespace.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/namespace.adoc.hbs similarity index 65% rename from share/mrdocs/addons/generator/asciidoc/partials/namespace.adoc.hbs rename to share/mrdocs/addons/generator/asciidoc/partials/symbols/namespace.adoc.hbs index d9b17b30c..6fdfd1f31 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/namespace.adoc.hbs +++ b/share/mrdocs/addons/generator/asciidoc/partials/symbols/namespace.adoc.hbs @@ -1,5 +1,5 @@ {{!-- namespace --}} -= {{#if symbol.name}}Namespace {{symbol.name}}{{else if symbol.parent}}Unnamed namespace{{else}}Global namespace{{/if}} += {{#if symbol.name}}Namespace {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}}{{else if symbol.parent}}Unnamed namespace{{else}}Global namespace{{/if}} {{#each (group_by symbol.members "kind")}} == {{#if (eq @key "record")}}Types{{else if (eq @key "variable")}}Constants{{else}}{{capitalize @key}}s{{/if}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/record.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/record.adoc.hbs similarity index 71% rename from share/mrdocs/addons/generator/asciidoc/partials/record.adoc.hbs rename to share/mrdocs/addons/generator/asciidoc/partials/symbols/record.adoc.hbs index b6da72f46..8aac00d5b 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/record.adoc.hbs +++ b/share/mrdocs/addons/generator/asciidoc/partials/symbols/record.adoc.hbs @@ -1,5 +1,5 @@ {{!-- record --}} -= {{#if symbol.name}}Class {{symbol.name}}{{else}}Unnamed class{{/if}} += {{#if symbol.name}}Class {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}}{{else}}Unnamed class{{/if}} {{symbol.doc.brief}} @@ -7,7 +7,10 @@ {{>source dcl=(primary_location symbol)}} -{{>record-decl symbol isFriend=false}} +[source,cpp,subs="verbatim,macros,-callouts"] +---- +{{>signature/record symbol=symbol}}; +---- {{#with symbol.interface}} {{#if overloads}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/specialization.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/specialization.adoc.hbs similarity index 100% rename from share/mrdocs/addons/generator/asciidoc/partials/specialization.adoc.hbs rename to share/mrdocs/addons/generator/asciidoc/partials/symbols/specialization.adoc.hbs diff --git a/share/mrdocs/addons/generator/asciidoc/partials/symbols/typedef.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/typedef.adoc.hbs new file mode 100644 index 000000000..3b0558657 --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/symbols/typedef.adoc.hbs @@ -0,0 +1,20 @@ +{{!-- typedef --}} += {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}} + +{{symbol.doc.brief}} + +== Synopsis + +{{>source dcl=(primary_location symbol)}} + +[source,cpp,subs="verbatim,macros,-callouts"] +---- +{{>signature/typedef symbol=symbol}}; +---- + +{{#if symbol.doc.description}} +== Description + +{{symbol.doc.description}} + +{{/if}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/undefined.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/undefined.adoc.hbs similarity index 100% rename from share/mrdocs/addons/generator/asciidoc/partials/undefined.adoc.hbs rename to share/mrdocs/addons/generator/asciidoc/partials/symbols/undefined.adoc.hbs diff --git a/share/mrdocs/addons/generator/asciidoc/partials/symbols/variable.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/variable.adoc.hbs new file mode 100644 index 000000000..2978a71f1 --- /dev/null +++ b/share/mrdocs/addons/generator/asciidoc/partials/symbols/variable.adoc.hbs @@ -0,0 +1,20 @@ +{{!-- variable --}} += {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}} + +{{symbol.doc.brief}} + +== Synopsis + +{{>source dcl=(primary_location symbol)}} + +[source,cpp,subs="verbatim,macros,-callouts"] +---- +{{>signature/variable symbol=symbol}}; +---- + +{{#if symbol.doc.description}} +== Description + +{{symbol.doc.description}} + +{{/if}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/typedef.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/typedef.adoc.hbs deleted file mode 100644 index 0de62c8c5..000000000 --- a/share/mrdocs/addons/generator/asciidoc/partials/typedef.adoc.hbs +++ /dev/null @@ -1,27 +0,0 @@ -{{!-- typedef --}} -= {{symbol.name}} - -{{symbol.doc.brief}} - -== Synopsis - -{{>source dcl=(primary_location symbol)}} - -[source,cpp,subs="verbatim,macros,-callouts"] ----- -{{#if symbol.isUsing~}} - {{~#if symbol.template}}{{>template-head symbol.template}} - {{/if~}} - using {{symbol.name}} = {{>declarator symbol.type}} -{{~else~}} - typedef {{>declarator symbol.type decl-name=symbol.name}} -{{~/if}} -; ----- - -{{#if symbol.doc.description}} -== Description - -{{symbol.doc.description}} - -{{/if}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/variable.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/variable.adoc.hbs deleted file mode 100644 index ddb688165..000000000 --- a/share/mrdocs/addons/generator/asciidoc/partials/variable.adoc.hbs +++ /dev/null @@ -1,35 +0,0 @@ -{{!-- variable --}} -= {{symbol.name}} - -{{symbol.doc.brief}} - -== Synopsis - -{{>source dcl=(primary_location symbol)}} - -[source,cpp,subs="verbatim,macros,-callouts"] ----- -{{#if symbol.template}}{{>template-head symbol.template}} -{{/if~}} -{{#if symbol.constexprKind}}{{symbol.constexprKind}} -{{/if~}} -{{#if symbol.storageClass}}{{symbol.storageClass}} -{{/if~}} -{{#if symbol.isThreadLocal}}thread_local -{{/if~}} -{{#if (or (eq symbol.template.kind "explicit") (eq symbol.template.kind "partial"))~}} - {{>declarator-before symbol.type}} {{#if symbol.template.primary.id~}}xref:{{symbol.template.primary.ref}}[{{symbol.name}}]{{else}}{{symbol.name}}{{/if~}} - {{~>template-args args=symbol.template.args~}} -{{else~}} - {{>declarator-before symbol.type}} {{symbol.name~}} -{{/if~}} -{{>declarator-after symbol.type~}} -; ----- - -{{#if symbol.doc.description}} -== Description - -{{symbol.doc.description}} - -{{/if}} diff --git a/src/lib/Metadata/DomMetadata.cpp b/src/lib/Metadata/DomMetadata.cpp index fdc6d4e8d..c7a9042a4 100644 --- a/src/lib/Metadata/DomMetadata.cpp +++ b/src/lib/Metadata/DomMetadata.cpp @@ -79,7 +79,8 @@ domCreate( { "kind", "overload"}, { "name", overloads.Name }, { "members", dom::newArray( - overloads.Members, domCorpus) } + overloads.Members, domCorpus) }, + { "parent", domCorpus.get(overloads.Parent) } }); }