Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adoc template work #494

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{#if relfileprefix}}:relfileprefix: {{relfileprefix}}{{/if}}
{{#with symbol}}
[#{{#if (is_multipage)}}{{id}}{{else}}{{ref}}{{/if}}]
{{> (lookup . 'kind') symbol=.}}
{{/with}}
[#{{#if (is_multipage)}}{{symbol.id}}{{else}}{{symbol.ref}}{{/if}}]

{{> (concat 'symbols' '/' (lookup symbol 'kind')) symbol=symbol}}
Original file line number Diff line number Diff line change
@@ -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}}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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}}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enum {{>declarator-id symbol~}}
{{#if symbol.type}} : {{>declarator symbol.type}}{{/if}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{symbol.name}}{{#if symbol.initializer}} = {{symbol.initializer}}{{~/if}}
Original file line number Diff line number Diff line change
@@ -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}}
Original file line number Diff line number Diff line change
@@ -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}}
Original file line number Diff line number Diff line change
@@ -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}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{!-- namespace --}}
Original file line number Diff line number Diff line change
@@ -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}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{!-- specialization --}}
Original file line number Diff line number Diff line change
@@ -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}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{!-- undefined --}}
Original file line number Diff line number Diff line change
@@ -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}}
Original file line number Diff line number Diff line change
@@ -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}}

Expand All @@ -9,7 +9,7 @@

[source,cpp,subs="verbatim,macros,-callouts"]
----
enum {{symbol.name}};
{{>signature/enum symbol=symbol}};
----

{{#if symbol.members}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{!-- enumerator --}}
= {{symbol.name}}
= {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}}

{{symbol.doc.brief}}

Expand All @@ -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}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{!-- field --}}
= {{symbol.name}}
= {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}}

{{symbol.doc.brief}}

Expand All @@ -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}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{{!-- function --}}
= {{symbol.name}}
= {{>nested-name-specifier symbol=symbol.parent}}{{symbol.name}}

{{symbol.doc.brief}}

== Synopsis

{{>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
Expand Down
Original file line number Diff line number Diff line change
@@ -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}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{{!-- 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}}

== Synopsis

{{>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}}
Expand Down
Original file line number Diff line number Diff line change
@@ -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}}
Original file line number Diff line number Diff line change
@@ -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}}
Loading
Loading