Skip to content

Commit 2541fbd

Browse files
committed
Add code documentation for value_ptr.hh
1 parent 5b3f50b commit 2541fbd

File tree

2 files changed

+312
-8
lines changed

2 files changed

+312
-8
lines changed

doc/source/conf.py

+29
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"exhale",
3333
"sphinx_rtd_theme",
3434
"sphinx.ext.todo",
35+
"sphinx.ext.extlinks",
3536
]
3637

3738
# Add any paths that contain templates here, relative to this directory.
@@ -59,7 +60,27 @@
5960
breathe_projects = {"reactor-cpp": "../doxygen/xml"}
6061
breathe_default_project = "reactor-cpp"
6162

63+
64+
def specificationsForKind(kind):
65+
'''
66+
For a given input ``kind``, return the list of reStructuredText
67+
specifications for the associated Breathe directive.
68+
'''
69+
# Change the defaults for .. doxygenclass:: and .. doxygenstruct::
70+
if kind == "class" or kind == "struct":
71+
return [
72+
":members:",
73+
":protected-members:",
74+
":private-members:",
75+
":undoc-members:"
76+
]
77+
# An empty list signals to Exhale to use the defaults
78+
else:
79+
return []
80+
81+
6282
# Exhale Configuration
83+
from exhale import utils
6384
exhale_args = {
6485
# These arguments are required
6586
"containmentFolder": "./api",
@@ -68,6 +89,9 @@
6889
"doxygenStripFromPath": "..",
6990
# Suggested optional arguments
7091
"createTreeView": True,
92+
# override breathe defaults
93+
"customSpecificationsMapping": utils.makeCustomSpecificationsMapping(
94+
specificationsForKind),
7195
}
7296

7397
# Tell sphinx what the primary language being documented is.
@@ -88,3 +112,8 @@
88112

89113
# show todo notes
90114
todo_include_todos = True
115+
116+
# configure external links
117+
extlinks = {
118+
'std-memory': ('https://en.cppreference.com/w/cpp/memory/%s', 'std::'),
119+
}

0 commit comments

Comments
 (0)