1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
.. _function-example:
doxygenfunction Directive Example
=================================
This directive generates the appropriate output for a single function. The
function name, including namespace, is required to be unique in the project.
For functions which have a declaration and definition in separate files, doxygen
generates two entries for the function and Breathe can get confused when faced
with this. As a result Breathe ignores what it considers to be the
implementation files when searching for the XML for the function documentation.
In order to do this, it ignores any entries in files which have filename
extensions listed in the :ref:`breathe_implementation_filename_extensions
<breathe-implementation-filename-extensions>` config variable.
Working Example
---------------
.. cpp:namespace:: @ex_function_example
This should work:
.. code-block:: rst
.. doxygenfunction:: open
:project: structcmd
It produces this output:
.. doxygenfunction:: open
:project: structcmd
Separated Declaration & Implementation Example
----------------------------------------------
.. cpp:namespace:: @ex_function_separated
This should work:
.. code-block:: rst
.. doxygenfunction:: open_di
:project: decl_impl
It produces this output:
.. doxygenfunction:: open_di
:project: decl_impl
Failing Example
---------------
.. cpp:namespace:: @ex_function_failing
This intentionally fails:
.. code-block:: rst
.. doxygenfunction:: made_up_function
:project: structcmd
It produces the following warning message:
.. warning::
doxygenfunction: Cannot find function "made_up_function" in doxygen xml output
|