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 b88ef7d19..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,4 +1,4 @@ {{#if relfileprefix}}:relfileprefix: {{relfileprefix}}{{/if}} [#{{#if (is_multipage)}}{{symbol.id}}{{else}}{{symbol.ref}}{{/if}}] -{{> (concat 'symbols' '/' (lookup . 'symbol.kind')) symbol=symbol}} +{{> (concat 'symbols' '/' (lookup symbol 'kind')) symbol=symbol}} 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 e62134c6b..000000000 --- a/share/mrdocs/addons/generator/asciidoc/partials/function-decl.adoc.hbs +++ /dev/null @@ -1,32 +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~}} -{{>declarator-id . link=template.primary}} -({{#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 d48e94411..000000000 --- a/share/mrdocs/addons/generator/asciidoc/partials/record-decl.adoc.hbs +++ /dev/null @@ -1,20 +0,0 @@ -[source,cpp,subs="verbatim,macros,-callouts"] ----- -{{#if template}}{{>template-head template}} -{{/if~}} -{{#if isFriend}}friend {{/if}}{{tag}} {{>declarator-id . link=template.primary~}} -{{#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/friend.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/signature/friend.adoc.hbs index ade2ae68c..17e146df9 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/signature/friend.adoc.hbs +++ b/share/mrdocs/addons/generator/asciidoc/partials/signature/friend.adoc.hbs @@ -1,12 +1,3 @@ -{{!-- -{{#if symbol.type~}} -friend {{>declarator symbol.type}} -{{else if (and symbol.symbol (eq symbol.symbol.kind "record"))~}} -{{>signature/record symbol.symbol isFriend=true~}} -{{else if (and symbol.symbol (eq symbol.symbol.kind "function"))~}} -{{>signature/function symbol.symbol isFriend=true~}} -{{/if}} ---}} {{#if symbol.type~}} friend {{>declarator symbol.type~}} {{else if symbol.symbol~}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/symbols/enum.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/enum.adoc.hbs index 8398b7071..37b6102da 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/symbols/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}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/symbols/enumerator.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/enumerator.adoc.hbs index 42cce14d2..08a113038 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/symbols/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}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/symbols/field.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/field.adoc.hbs index f8f322fd6..bed27ed03 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/symbols/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}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/symbols/function.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/function.adoc.hbs index a42197fa4..cf8227247 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/symbols/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}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/symbols/namespace.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/namespace.adoc.hbs index d9b17b30c..6fdfd1f31 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/symbols/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/symbols/record.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/record.adoc.hbs index 0dbd455c2..8aac00d5b 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/symbols/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}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/symbols/typedef.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/typedef.adoc.hbs index 4cc896567..3b0558657 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/symbols/typedef.adoc.hbs +++ b/share/mrdocs/addons/generator/asciidoc/partials/symbols/typedef.adoc.hbs @@ -1,5 +1,5 @@ {{!-- typedef --}} -= {{symbol.name}} += {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}} {{symbol.doc.brief}} diff --git a/share/mrdocs/addons/generator/asciidoc/partials/symbols/variable.adoc.hbs b/share/mrdocs/addons/generator/asciidoc/partials/symbols/variable.adoc.hbs index 66564b62b..2978a71f1 100644 --- a/share/mrdocs/addons/generator/asciidoc/partials/symbols/variable.adoc.hbs +++ b/share/mrdocs/addons/generator/asciidoc/partials/symbols/variable.adoc.hbs @@ -1,5 +1,5 @@ {{!-- variable --}} -= {{symbol.name}} += {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}} {{symbol.doc.brief}} 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) } }); }