Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Docs/Doxybook: Move the Doxybook logic that marks things as "Inherite…
Browse files Browse the repository at this point in the history
…d from"

into each synopsis template so that newlines are inserted in the right place.
  • Loading branch information
brycelelbach committed Dec 24, 2021
1 parent 51aaed6 commit f7ae762
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 29 deletions.
2 changes: 1 addition & 1 deletion dependencies/cub
Submodule cub updated 1 files
+1 −2 CODE_OF_CONDUCT.md
40 changes: 20 additions & 20 deletions docs/doxybook_templates/class_members.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "publicTypes") -%}
{%- for child in base.publicTypes -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- set synopsis_is_inherited = true -%}
{%- include "synopsis_type.tmpl" -%}
{%- set synopsis_is_inherited = false -%}
{%- set synopsis_needs_leading_line_break = true -%}
{%- endfor -%}
{%- endif -%}
Expand All @@ -51,9 +51,9 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "publicClasses") -%}
{%- for child in base.publicClasses -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- set synopsis_is_inherited = true -%}
{%- include "synopsis_class.tmpl" -%}
{%- set synopsis_is_inherited = false -%}
{%- set synopsis_needs_leading_line_break = true -%}
{%- endfor -%}
{%- endif -%}
Expand All @@ -70,9 +70,9 @@
{%- if existsIn(base, "friends") -%}
{%- for child in base.friends -%}
{%- if child.type == "class" or child.type == "struct" -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- set synopsis_is_inherited = true -%}
{%- include "synopsis_friend_class.tmpl" -%}
{%- set synopsis_is_inherited = false -%}
{%- set synopsis_needs_leading_line_break = true -%}
{%- endif -%}
{%- endfor -%}
Expand All @@ -87,9 +87,9 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "publicAttributes") -%}
{%- for child in base.publicAttributes -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- set synopsis_is_inherited = true -%}
{%- include "synopsis_variable.tmpl" -%}
{%- set synopsis_is_inherited = false -%}
{%- set synopsis_needs_leading_line_break = true -%}
{%- endfor -%}
{%- endif -%}
Expand All @@ -103,9 +103,9 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "publicFunctions") -%}
{%- for child in base.publicFunctions -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- set synopsis_is_inherited = true -%}
{%- include "synopsis_function.tmpl" -%}
{%- set synopsis_is_inherited = false -%}
{%- set synopsis_needs_leading_line_break = true -%}
{%- endfor -%}
{%- endif -%}
Expand All @@ -122,9 +122,9 @@
{%- if existsIn(base, "friends") -%}
{%- for child in base.friends -%}
{%- if child.type != "class" and child.type != "struct" -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- set synopsis_is_inherited = true -%}
{%- include "synopsis_friend_function.tmpl" -%}
{%- set synopsis_is_inherited = false -%}
{%- set synopsis_needs_leading_line_break = true -%}
{%- endif -%}
{%- endfor -%}
Expand All @@ -149,9 +149,9 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "protectedTypes") -%}
{%- for child in base.protectedTypes -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- set synopsis_is_inherited = true -%}
{%- include "synopsis_type.tmpl" -%}
{%- set synopsis_is_inherited = false -%}
{%- set synopsis_needs_leading_line_break = true -%}
{%- endfor -%}
{%- endif -%}
Expand All @@ -165,9 +165,9 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "protectedClasses") -%}
{%- for child in base.protectedClasses -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- set synopsis_is_inherited = true -%}
{%- include "synopsis_class.tmpl" -%}
{%- set synopsis_is_inherited = false -%}
{%- set synopsis_needs_leading_line_break = true -%}
{%- endfor -%}
{%- endif -%}
Expand All @@ -181,9 +181,9 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "protectedAttributes") -%}
{%- for child in base.protectedAttributes -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- set synopsis_is_inherited = true -%}
{%- include "synopsis_variable.tmpl" -%}
{%- set synopsis_is_inherited = false -%}
{%- set synopsis_needs_leading_line_break = true -%}
{%- endfor -%}
{%- endif -%}
Expand All @@ -197,9 +197,9 @@
{%- if exists("baseClasses") -%}{%- for base in baseClasses -%}
{%- if existsIn(base, "protectedFunctions") -%}
{%- for child in base.protectedFunctions -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from.tmpl", base) -}}
{%- set synopsis_is_inherited = true -%}
{%- include "synopsis_function.tmpl" -%}
{%- set synopsis_is_inherited = false -%}
{%- set synopsis_needs_leading_line_break = true -%}
{%- endfor -%}
{%- endif -%}
Expand Down
1 change: 1 addition & 0 deletions docs/doxybook_templates/synopsis_class.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{%- include "synopsis_leading_line_break.tmpl" -%}
{%- include "synopsis_inherited_from.tmpl" -%}
{%- set child.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_brief.tmpl", child) -}}
{#- The Doxygen metadata that a parent has on its nested -#}{{ noop() -}}
Expand Down
1 change: 1 addition & 0 deletions docs/doxybook_templates/synopsis_friend_class.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{%- include "synopsis_leading_line_break.tmpl" -%}
{%- include "synopsis_inherited_from.tmpl" -%}
{%- set child.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_brief.tmpl", child) -}}
{{- render("synopsis_template_parameters.tmpl", child) -}}
Expand Down
1 change: 1 addition & 0 deletions docs/doxybook_templates/synopsis_friend_function.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{%- include "synopsis_leading_line_break.tmpl" -%}
{%- include "synopsis_inherited_from.tmpl" -%}
{%- set child.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_brief.tmpl", child) -}}
{{- render("synopsis_template_parameters.tmpl", child) -}}
Expand Down
1 change: 1 addition & 0 deletions docs/doxybook_templates/synopsis_function.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{%- include "synopsis_leading_line_break.tmpl" -%}
{%- include "synopsis_inherited_from.tmpl" -%}
{%- set child.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_brief.tmpl", child) -}}
{{- render("synopsis_template_parameters.tmpl", child) -}}
Expand Down
12 changes: 4 additions & 8 deletions docs/doxybook_templates/synopsis_inherited_from.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<span class="doxybook-comment">{{ noop() -}}
{%- if default(synopsis_indent_width, 0) != 0 -%}
<code>{%- include "synopsis_indent.tmpl" -%}</code>
{%- endif -%}
/* Inherited from <code>{{ noop() -}}
<b><a href="{{ url }}">{%- include "name_qualified.tmpl" -%}</a></b>{{ noop() -}}
</code> */{{ noop() -}}
</span>{{ noop() -}}
{%- if default(synopsis_is_inherited, false) != false -%}
{%- set base.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_inherited_from_comment.tmpl", base) -}}
{%- endif -%}
8 changes: 8 additions & 0 deletions docs/doxybook_templates/synopsis_inherited_from_comment.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<span class="doxybook-comment">{{ noop() -}}
{%- if default(synopsis_indent_width, 0) != 0 -%}
<code>{%- include "synopsis_indent.tmpl" -%}</code>
{%- endif -%}
/* Inherited from <code>{{ noop() -}}
<b><a href="{{ url }}">{%- include "name_qualified.tmpl" -%}</a></b>{{ noop() -}}
</code> */{{ noop() -}}
</span>{{ noop() -}}
1 change: 1 addition & 0 deletions docs/doxybook_templates/synopsis_type.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{%- include "synopsis_leading_line_break.tmpl" -%}
{%- include "synopsis_inherited_from.tmpl" -%}
{%- set child.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_brief.tmpl", child) -}}
{{- render("synopsis_template_parameters.tmpl", child) -}}
Expand Down
1 change: 1 addition & 0 deletions docs/doxybook_templates/synopsis_variable.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{%- include "synopsis_leading_line_break.tmpl" -%}
{%- include "synopsis_inherited_from.tmpl" -%}
{%- set child.synopsis_indent_width = default(synopsis_indent_width, 0) -%}
{{- render("synopsis_brief.tmpl", child) -}}
{{- render("synopsis_template_parameters.tmpl", child) -}}
Expand Down

0 comments on commit f7ae762

Please sign in to comment.