diff --git a/share/mrdocs/addons/generator/adoc/partials/markup/code-block.adoc.hbs b/share/mrdocs/addons/generator/adoc/partials/markup/code-block.adoc.hbs new file mode 100644 index 0000000000..deaae574b5 --- /dev/null +++ b/share/mrdocs/addons/generator/adoc/partials/markup/code-block.adoc.hbs @@ -0,0 +1,6 @@ +[source,cpp,subs="verbatim,macros,-callouts"] +---- +{{> @partial-block }} + +---- + diff --git a/share/mrdocs/addons/generator/adoc/partials/markup/em.adoc.hbs b/share/mrdocs/addons/generator/adoc/partials/markup/em.adoc.hbs new file mode 100644 index 0000000000..0e4c3e2ef3 --- /dev/null +++ b/share/mrdocs/addons/generator/adoc/partials/markup/em.adoc.hbs @@ -0,0 +1 @@ +_{{> @partial-block }}_ \ No newline at end of file diff --git a/share/mrdocs/addons/generator/adoc/partials/symbol.adoc.hbs b/share/mrdocs/addons/generator/adoc/partials/symbol.adoc.hbs index 7678217266..ace550722c 100644 --- a/share/mrdocs/addons/generator/adoc/partials/symbol.adoc.hbs +++ b/share/mrdocs/addons/generator/adoc/partials/symbol.adoc.hbs @@ -23,28 +23,12 @@ {{/if}} {{! Synopsis }} -{{#unless (contains (arr "namespace") symbol.kind)}} +{{#unless (eq symbol.kind "namespace")}} {{#> markup/dynamic-level-h }}Synopsis{{/markup/dynamic-level-h}} {{>location/source dcl=(primary_location symbol)}} -{{#if (ne symbol.kind "overloads")}} -[source,cpp,subs="verbatim,macros,-callouts"] ----- -{{> symbol/signature symbol }} - ----- - -{{else}} -{{#each symbol.members as | member |}} -[source,cpp,subs="verbatim,macros,-callouts"] ----- -{{> symbol/signature member link=member}} - ----- - -{{/each}} -{{/if}} +{{> symbol/signatures symbol }} {{/unless}} {{! Tranches }} {{#if symbol.interface}} diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signatures.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signatures.hbs new file mode 100644 index 0000000000..038b78d88f --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signatures.hbs @@ -0,0 +1,29 @@ +{{!-- + Renders code blocks with signatures related to a symbol + + For most symbols, this will render a single code block with the symbol's signature. + + For function overloads, this will render a code block for each overload. + + Expected Context: {Symbol Object} + + Example: + {{> symbol/signatures symbol }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{#if (ne kind "overloads")}} +{{#> markup/code-block }} +{{> symbol/signature }} +{{/markup/code-block}} + +{{else}} +{{#each members as | member |}} +{{#> markup/code-block }} +{{> symbol/signature member link=member}} +{{/markup/code-block}} + +{{#> markup/span class="small" }}{{#> markup/a href=(relativize member.url) }}{{#>markup/em }}» more...{{/markup/em}}{{/markup/a}}{{/markup/span}} + +{{/each}} +{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/html/partials/markup/code-block.html.hbs b/share/mrdocs/addons/generator/html/partials/markup/code-block.html.hbs new file mode 100644 index 0000000000..1bf1feefc3 --- /dev/null +++ b/share/mrdocs/addons/generator/html/partials/markup/code-block.html.hbs @@ -0,0 +1,6 @@ +
+
+{{> @partial-block }}
+
+
+
\ No newline at end of file
diff --git a/share/mrdocs/addons/generator/html/partials/markup/em.html.hbs b/share/mrdocs/addons/generator/html/partials/markup/em.html.hbs
new file mode 100644
index 0000000000..a1f7c59740
--- /dev/null
+++ b/share/mrdocs/addons/generator/html/partials/markup/em.html.hbs
@@ -0,0 +1 @@
+{{> @partial-block }}
\ No newline at end of file
diff --git a/share/mrdocs/addons/generator/html/partials/markup/span.html.hbs b/share/mrdocs/addons/generator/html/partials/markup/span.html.hbs
index b6813ca435..5c5d613608 100644
--- a/share/mrdocs/addons/generator/html/partials/markup/span.html.hbs
+++ b/share/mrdocs/addons/generator/html/partials/markup/span.html.hbs
@@ -1,4 +1 @@
-
- {{> @partial-block }}
-
-
\ No newline at end of file
+{{> @partial-block }}
\ No newline at end of file
diff --git a/share/mrdocs/addons/generator/html/partials/symbol.html.hbs b/share/mrdocs/addons/generator/html/partials/symbol.html.hbs
index 928c4d1ab5..933382b6c2 100644
--- a/share/mrdocs/addons/generator/html/partials/symbol.html.hbs
+++ b/share/mrdocs/addons/generator/html/partials/symbol.html.hbs
@@ -29,30 +29,14 @@
{{/unless}}
{{! Synopsis }}
-{{#unless (contains (arr "namespace") symbol.kind)}}
+{{#unless (eq symbol.kind "namespace")}}
-
-{{> symbol/signature symbol }}
-
-
-
-{{else}}
-{{#each symbol.members as | member |}}
-
-
-{{> symbol/signature member }}
+{{> symbol/signatures symbol }}
-
-
-» more...
-{{/each}}
-{{/if}}
Explicit
- [constructor]
- Explicit [constructor]<explicit-ctor.cpp>
-
+
explicit
-Explicit();
+Explicit();
-
-» more...
+» more...
+
-
+
explicit
-Explicit(Explicit const&);
+Explicit(Explicit const&);
-
-» more...
+» more...
+
-
+
explicit
-Explicit(Explicit&&) noexcept;
+Explicit(Explicit&&) noexcept;
-
-» more...
+» more...
+
-
+
explicit
-Explicit(
+Explicit(
int,
int);
-
-» more...
+» more...
+
+
ExplicitTrue
- [constructor]
- ExplicitTrue [constructor]<explicit-ctor.cpp>
-
+
explicit(true)
-ExplicitTrue();
+ExplicitTrue();
-
-» more...
+» more...
+
-
+
explicit(true)
-ExplicitTrue(ExplicitTrue const&);
+ExplicitTrue(ExplicitTrue const&);
-
-» more...
+» more...
+
-
+
explicit(true)
-ExplicitTrue(ExplicitTrue&&) noexcept;
+ExplicitTrue(ExplicitTrue&&) noexcept;
-
-» more...
+» more...
+
-
+
explicit(true)
-ExplicitTrue(
+ExplicitTrue(
int,
int);
-
-» more...
+» more...
+
+
ExplicitFalse
- [constructor]
- ExplicitFalse [constructor]<explicit-ctor.cpp>
-
+
explicit(false)
-ExplicitFalse();
+ExplicitFalse();
-
-» more...
+» more...
+
-
+
explicit(false)
-ExplicitFalse(ExplicitFalse const&);
+ExplicitFalse(ExplicitFalse const&);
-
-» more...
+» more...
+
-
+
explicit(false)
-ExplicitFalse(ExplicitFalse&&) noexcept;
+ExplicitFalse(ExplicitFalse&&) noexcept;
-
-» more...
+» more...
+
-
+
explicit(false)
-ExplicitFalse(
+ExplicitFalse(
int,
int);
-
-» more...
+» more...
+
+
ExplicitExpression
- [constructor]
- ExplicitExpression [constructor]<explicit-ctor.cpp>
-
+
explicit(B)
-ExplicitExpression();
+ExplicitExpression();
-
-» more...
+» more...
+
-
+
explicit(B)
-ExplicitExpression(ExplicitExpression const&);
+ExplicitExpression(ExplicitExpression const&);
-
-» more...
+» more...
+
-
+
explicit(B)
-ExplicitExpression(ExplicitExpression&&) noexcept;
+ExplicitExpression(ExplicitExpression&&) noexcept;
-
-» more...
+» more...
+
-
+
explicit(B)
-ExplicitExpression(
+ExplicitExpression(
int,
int);
-
-» more...
+» more...
+
+
<explicit-object-parameter.cpp>
-
+
template<typename Self>
constexpr
auto&&
-value(this Self&& self);
+value(this Self&& self);
-
-» more...
+» more...
+
-
+
template<typename Self>
constexpr
auto&&
-value(this
+value(this
Self&& self,
int x);
-
-» more...
+» more...
+
+
<requires-clause.cpp>
-
+
template<typename T>
void
-f() requires (sizeof(T) == 4);
+f() requires (sizeof(T) == 4);
-
-» more...
+» more...
+
-
+
template<typename T>
void
-f() requires (sizeof(T) == 2);
+f() requires (sizeof(T) == 2);
-
-» more...
+» more...
+
+
<requires-clause.cpp>
-
+
template<typename T> requires (sizeof(T) == 4)
void
-g();
+g();
-
-» more...
+» more...
+
-
+
template<typename T> requires (sizeof(U) == 2)
void
-g();
+g();
-
-» more...
+» more...
+
+
<temp/c_mft_expl_inline.cpp>
-
+
template<typename T>
void
-f();
+f();
-
-» more...
+» more...
+
-
+
template<>
void
-f<int>();
+f<int>();
-
-» more...
+» more...
+
+
<temp/c_mft_expl_outside.cpp>
-
+
template<typename T>
void
-f();
+f();
-
-» more...
+» more...
+
-
+
template<>
void
-f<int>();
+f<int>();
-
-» more...
+» more...
+
+
<temp/ct_mft_expl_inline.cpp>
-
+
template<typename U>
void
-f();
+f();
-
-» more...
+» more...
+
-
+
template<>
void
-f<int>();
+f<int>();
-
-» more...
+» more...
+
+
<temp/ft_expl.cpp>
-
+
template<typename T>
void
-f();
+f();
-
-» more...
+» more...
+
-
+
template<>
void
-f<int>();
+f<int>();
-
-» more...
+» more...
+
+
x
- [variant member]
-x [variant member]y
- [variant member]
-y [variant member]x
- [variant member]
-x [variant member]y
- [variant member]
-y [variant member]z