Skip to content

Commit 6909b4a

Browse files
authored
Merge pull request #805 from readthedocs/agj/more-api-docs
Add more domain doc examples
2 parents a732d61 + 604fe08 commit 6909b4a

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

docs/demo/api.rst

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,73 @@ C++ API
2828

2929
Some cpp class
3030

31+
.. cpp:member:: float Sphinx::version
32+
33+
The description of Sphinx::version.
34+
35+
.. cpp:var:: int version
36+
37+
The description of version.
38+
39+
.. cpp:type:: std::vector<int> List
40+
41+
The description of List type.
42+
43+
.. cpp:enum:: MyEnum
44+
45+
An unscoped enum.
46+
47+
.. cpp:enumerator:: A
48+
49+
.. cpp:enum-class:: MyScopedEnum
50+
51+
A scoped enum.
52+
53+
.. cpp:enumerator:: B
54+
55+
.. cpp:enum-struct:: protected MyScopedVisibilityEnum : std::underlying_type<MySpecificEnum>::type
56+
57+
A scoped enum with non-default visibility, and with a specified underlying type.
58+
59+
.. cpp:enumerator:: B
60+
61+
62+
JavaScript API
63+
==============
64+
65+
.. Copied from sphinx-doc/sphinx/tests/roots
66+
67+
.. js:module:: module_a.submodule
68+
69+
* Link to :js:class:`ModTopLevel`
70+
71+
.. js:class:: ModTopLevel
72+
73+
* Link to :js:meth:`mod_child_1`
74+
* Link to :js:meth:`ModTopLevel.mod_child_1`
75+
76+
.. js:method:: ModTopLevel.mod_child_1
77+
78+
* Link to :js:meth:`mod_child_2`
79+
80+
.. js:method:: ModTopLevel.mod_child_2
81+
82+
* Link to :js:meth:`module_a.submodule.ModTopLevel.mod_child_1`
83+
84+
.. js:module:: module_b.submodule
85+
86+
* Link to :js:class:`ModTopLevel`
87+
88+
.. js:class:: ModNested
89+
90+
.. js:method:: nested_child_1
91+
92+
* Link to :js:meth:`nested_child_2`
93+
94+
.. js:method:: nested_child_2
95+
96+
* Link to :js:meth:`nested_child_1`
97+
3198

3299
Generated Index
33100
===============

0 commit comments

Comments
 (0)