@@ -215,15 +215,13 @@ Note that for documentation within NumPy, it is not necessary to do
215215Please use the ``numpydoc `` :ref: `formatting standard <numpydoc:format >` as
216216shown in their :ref: `example <numpydoc:example >`.
217217
218- .. _ doc_c_cpp :
218+ .. _ doc_c_code :
219219
220220Documenting C/C++ Code
221221======================
222222
223- Recently, NumPy headed out to use Doxygen _ along with Sphinx due to the urgent need
224- to generate C/C++ API reference documentation from comment blocks, especially with
225- the most recent expansion in the use of SIMD, and also due to the future reliance on C++.
226- Thanks to Breathe _, we were able to bind both worlds together at the lowest cost.
223+ NumPy uses Doxygen _ to parse specially-formatted C/C++ comment blocks. This generates
224+ XML files, which are converted by Breathe _ into RST, which is used by Sphinx.
227225
228226**It takes three steps to complete the documentation process **:
229227
@@ -235,10 +233,9 @@ is more preferable than the others due to the similarities with the current
235233existing non-indexed comment blocks.
236234
237235.. note ::
238- If you have never used Doxygen _ before, then maybe you need to take a quick
239- look at `"Documenting the code" <https://www.doxygen.nl/manual/docblocks.html >`__.
236+ Please see `"Documenting the code" <https://www.doxygen.nl/manual/docblocks.html >`__.
240237
241- This is how Javadoc style looks like::
238+ This is what Javadoc style looks like::
242239
243240 /**
244241 * Your brief is here.
@@ -252,7 +249,7 @@ For line comment, insert a triple forward slash::
252249
253250And for structured data members, just insert triple forward slash and less-than sign::
254251
255- /// Data type brief.
252+ /// Data type brief description
256253 typedef struct {
257254 int member_1; ///< Member 1 description.
258255 int member_2; ///< Member 2 description.
@@ -297,10 +294,16 @@ It is interpreted as source code.
297294
298295``@rst/@endrst ``
299296
300- Starts/Ends a block of reST markup. Take a look at the following example:
297+ Starts/Ends a block of reST markup.
298+
299+ Example
300+ ~~~~~~~
301+ Take a look at the following example:
301302
302303.. literalinclude :: examples/doxy_rst.h
303304
305+ And here is how it is rendered:
306+
304307.. doxygenfunction :: doxy_reST_example
305308
3063092. Feeding Doxygen
@@ -311,11 +314,11 @@ C/C++ header paths within the sub-config files of Doxygen.
311314
312315Sub-config files have the unique name ``.doxyfile ``, which you can usually find near
313316directories that contain documented headers. You need to create a new config file if
314- there's no one located in a path close(2-depth) to the headers you want to add.
317+ there's not one located in a path close(2-depth) to the headers you want to add.
315318
316319Sub-config files can accept any of Doxygen _ `configuration options <https://www.doxygen.nl/manual/config.html >`__,
317- but you should be aware of not overriding or re-initializing any configuration option,
318- you must only count on the concatenation operator "+=". For example::
320+ but do not override or re-initialize any configuration option,
321+ rather only use the concatenation operator "+=". For example::
319322
320323 # to specfiy certain headers
321324 INPUT += @CUR_DIR/header1.h \
@@ -336,7 +339,7 @@ you must only count on the concatenation operator "+=". For example::
336339-----------------------
337340
338341Breathe _ provides a wide range of custom directives to allow
339- including the generated documents by Doxygen _ into reST files.
342+ converting the documents generated by Doxygen _ into reST files.
340343
341344.. note ::
342345 For more information, please check out "`Directives & Config Variables <https://breathe.readthedocs.io/en/latest/directives.html >`__"
0 commit comments