Skip to content

Commit 2c48c45

Browse files
committed
ENH: Implement new breathelinkstruct Directive
The original breathelink can only handle doxygenclass. Defining breathelinkstruct specifies this is a struct and will be processed as a doxygenstruct in the breathelink source code. In addition, the documenation for how to write a new example has been updated with the new directive.
1 parent e49d27f commit 2c48c45

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

Documentation/Contribute/WriteANewExample.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,15 @@ Classes demonstrated
182182
--------------------
183183

184184
At the end of the example, provide quick reference and a link to the doxygen
185-
documentation for the important classes used in the example. To do this, use
186-
the ``breathelink`` directive, as follows::
185+
documentation for the important classes or structs used in the example. To do this, use
186+
the ``breathelink`` directive for C++ classes or ``breathelinkstruct`` directive for C++ structs, as follows::
187187

188188
.. breathelink:: itk::BinaryDilateImageFilter
189+
.. breathelinkstruct:: itk::Index
189190

190-
Note that the breathelink directive is a custom one which makes use of:
191+
Note that ``breathelink`` and ``breathelinkstruct`` are custom directives which make the use of:
191192

192-
- the `doxygenclass directive`_ provided by Breathe_ with the *:no-link:*
193+
- the `doxygenclass directive`_ or `doxygenstruct directive`_ provided by Breathe_ with the *:no-link:*
193194
option.
194195
- the `doxylink`_ directive which provides a link to the full doxygen
195196
documentation with an `external hyperlink target`_. Note that Doxygen URL's
@@ -198,6 +199,7 @@ Note that the breathelink directive is a custom one which makes use of:
198199
.. _Breathe: https://github.com/michaeljones/breathe
199200
.. _external hyperlink target: http://docutils.sourceforge.net/docs/user/rst/quickref.html#external-hyperlink-targets
200201
.. _doxygenclass directive: https://breathe.readthedocs.io/en/latest/class.html
202+
.. _doxygenstruct directive: https://breathe.readthedocs.io/en/latest/struct.html
201203
.. _figure directive: http://docutils.sourceforge.net/docs/ref/rst/directives.html#figure
202204
.. _literalinclude directive: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-literalinclude
203205
.. _literal block: http://docutils.sourceforge.net/docs/user/rst/quickref.html#literal-blocks

src/Core/Common/AddOffsetToIndex/Documentation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ Python
4545
Classes demonstrated
4646
--------------------
4747

48-
.. breathelink:: itk::Offset itk::Index
48+
.. breathelinkstruct:: itk::Offset itk::Index

src/Core/Common/CreateAIndex/Documentation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ Python
3939
Classes demonstrated
4040
--------------------
4141

42-
.. breathelink:: itk::Index
42+
.. breathelinkstruct:: itk::Index

src/Core/Common/CreateASize/Documentation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ Python
3939
Classes demonstrated
4040
--------------------
4141

42-
.. breathelink:: itk::Size
42+
.. breathelinkstruct:: itk::Size

src/Core/Common/DistanceBetweenIndices/Documentation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ Classes demonstrated
4040
--------------------
4141

4242
.. breathelink:: itk::Point
43-
.. breathelink:: itk::Index
43+
.. breathelinkstruct:: itk::Index

src/Core/Common/GetImageSize/Documentation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ Python
4444
Classes demonstrated
4545
--------------------
4646

47-
.. breathelink:: itk::Size
47+
.. breathelinkstruct:: itk::Size

0 commit comments

Comments
 (0)