From 1bfa504f9744c82bfb55f27cbbbab8393c0dd44c Mon Sep 17 00:00:00 2001 From: Anthony Johnson Date: Thu, 25 Jul 2019 19:27:22 -0600 Subject: [PATCH] Add more domain doc examples These are a few domain examples pulled from the Sphinx test doc roots. --- docs/demo/api.rst | 67 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/docs/demo/api.rst b/docs/demo/api.rst index 58a3e6b1..10e84fa9 100644 --- a/docs/demo/api.rst +++ b/docs/demo/api.rst @@ -28,6 +28,73 @@ C++ API Some cpp class +.. cpp:member:: float Sphinx::version + + The description of Sphinx::version. + +.. cpp:var:: int version + + The description of version. + +.. cpp:type:: std::vector List + + The description of List type. + +.. cpp:enum:: MyEnum + + An unscoped enum. + + .. cpp:enumerator:: A + +.. cpp:enum-class:: MyScopedEnum + + A scoped enum. + + .. cpp:enumerator:: B + +.. cpp:enum-struct:: protected MyScopedVisibilityEnum : std::underlying_type::type + + A scoped enum with non-default visibility, and with a specified underlying type. + + .. cpp:enumerator:: B + + +JavaScript API +============== + +.. Copied from sphinx-doc/sphinx/tests/roots + +.. js:module:: module_a.submodule + +* Link to :js:class:`ModTopLevel` + +.. js:class:: ModTopLevel + + * Link to :js:meth:`mod_child_1` + * Link to :js:meth:`ModTopLevel.mod_child_1` + +.. js:method:: ModTopLevel.mod_child_1 + + * Link to :js:meth:`mod_child_2` + +.. js:method:: ModTopLevel.mod_child_2 + + * Link to :js:meth:`module_a.submodule.ModTopLevel.mod_child_1` + +.. js:module:: module_b.submodule + +* Link to :js:class:`ModTopLevel` + +.. js:class:: ModNested + + .. js:method:: nested_child_1 + + * Link to :js:meth:`nested_child_2` + + .. js:method:: nested_child_2 + + * Link to :js:meth:`nested_child_1` + Generated Index ===============