├── examples ├── tinyxml │ ├── .gitignore │ ├── tinyxml.cfg │ ├── Makefile │ └── make.bat ├── specific │ ├── c_union.h │ ├── c_macro.h │ ├── imageExample.png │ ├── c_struct.h │ ├── cpp_friendclass.h │ ├── cpp_union.h │ ├── programlistinginclude.txt │ ├── cpp_concept.h │ ├── parameters.h │ ├── auto_function.h │ ├── cpp_anon.h │ ├── cpp_constexpr_hax.h │ ├── fixedwidthfont.h │ ├── .gitignore │ ├── multifile │ │ ├── one │ │ │ └── Util.h │ │ └── two │ │ │ └── Util.h │ ├── cpp_trailing_return_type.h │ ├── inheritance.h │ ├── class.cpp │ ├── links.h │ ├── auto_class.h │ ├── cpp_enum.h │ ├── cpp_inherited_members.h │ ├── headings.h │ ├── latexmath.h │ ├── template_class.cfg │ ├── union.cfg │ ├── c_enum.cfg │ ├── c_macro.cfg │ ├── enum.cfg │ ├── links.cfg │ ├── lists.cfg │ ├── alias.h │ ├── cpp_enum.cfg │ ├── define.cfg │ ├── headings.cfg │ ├── image.h │ ├── tables.cfg │ ├── template_function.cfg │ ├── auto.cfg │ ├── decl_impl.cpp │ ├── interface.h │ ├── members.cfg │ ├── inline.cfg │ ├── simplesect.cfg │ ├── template_type_alias.cfg │ ├── using_in_ns.cfg │ ├── code_blocks.cfg │ ├── cpp_concept.cfg │ ├── headerfile.cfg │ ├── image.cfg │ ├── inheritance.cfg │ ├── interface.cfg │ ├── latexmath.cfg │ ├── c_typedef.cfg │ ├── membergroups.cfg │ ├── nutshell.cfg │ ├── array.cfg │ ├── template_class_non_type.cfg │ ├── array.h │ ├── enum.h │ ├── c_union.cfg │ ├── cpp_constexpr_hax.cfg │ ├── cpp_ns_template_specialization.h │ ├── decl_impl.cfg │ ├── functionOverload.cfg │ ├── c_file.cfg │ ├── c_struct.cfg │ ├── cpp_union.cfg │ ├── struct.cfg │ ├── class.cfg │ ├── cpp_anon.cfg │ ├── cpp_function_lookup.cfg │ ├── struct_function.h │ ├── typedef.cfg │ ├── cpp_function.cfg │ ├── alias.cfg │ ├── name.cfg │ ├── namespacefile.cfg │ ├── template_specialisation.cfg │ ├── cpp_friendclass.cfg │ ├── cpp_trailing_return_type.cfg │ ├── membergroups.h │ ├── multifile.cfg │ ├── name.h │ ├── c_typedef.h │ ├── qtsignalsandslots.cfg │ ├── struct_function.cfg │ ├── fixedwidthfont.cfg │ ├── cpp_inherited_members.cfg │ ├── parameters.cfg │ ├── userdefined.cfg │ ├── xrefsect.cfg │ ├── programlisting.h │ ├── group.cfg │ ├── dot_graphs.cfg │ ├── using_in_ns.h │ ├── rst.cfg │ ├── cpp_function.h │ ├── cpp_ns_template_specialization.cfg │ ├── decl_impl.h │ ├── inline.h │ ├── simplesect.h │ ├── members.h │ ├── programlisting.cfg │ ├── headerfile.h │ ├── template_specialisation.h │ ├── template_type_alias.h │ ├── typedef.h │ ├── define.h │ ├── cpp_function_lookup.h │ ├── dot_graphs.h │ ├── template_class.h │ ├── union.h │ ├── xrefsect.h │ ├── userdefined.h │ ├── qtsignalsandslots.h │ ├── code_blocks.h │ ├── nutshell.h │ ├── template_class_non_type.h │ ├── template_function.h │ ├── dotfile.dot │ ├── functionOverload.h │ ├── c_enum.h │ ├── struct.h │ └── c_file.h └── doxygen │ ├── example_test.cpp │ ├── diagrams_a.h │ ├── diagrams_b.h │ ├── diagrams_e.h │ ├── diagrams_c.h │ ├── diagrams_d.h │ ├── tag.cpp │ ├── class.h │ ├── file.h │ ├── enum.cfg │ ├── file.cfg │ ├── func.cfg │ ├── par.cfg │ ├── class.cfg │ ├── group.cfg │ ├── interface.h │ ├── page.cfg │ ├── author.cfg │ ├── qtstyle.cfg │ ├── templ.cfg │ ├── concept.cfg │ ├── pyexample.cfg │ ├── relates.cfg │ ├── afterdoc.cfg │ ├── interface.cfg │ ├── jdstyle.cfg │ ├── parblock.cfg │ ├── structcmd.cfg │ ├── autolink.cfg │ ├── restypedef.cfg │ ├── define.cfg │ ├── docstring.cfg │ ├── overload.cfg │ ├── include.cfg │ ├── tag.cfg │ ├── .gitignore │ ├── concept.h │ ├── relates.cpp │ ├── example.cfg │ ├── memgrp.cfg │ ├── par.cpp │ ├── example.cpp │ ├── page.doc │ ├── afterdoc.h │ ├── diagrams.cfg │ ├── include.cpp │ ├── restypedef.cpp │ ├── define.h │ ├── author.cpp │ ├── docstring.py │ ├── manual.cfg │ ├── overload.cpp │ ├── parblock.cpp │ ├── pyexample.py │ ├── enum.h │ ├── func.h │ ├── templ.cpp │ ├── memgrp.cpp │ ├── manual.c │ ├── structcmd.h │ ├── qtstyle.cpp │ └── jdstyle.cpp ├── documentation ├── .gitignore ├── source │ ├── _static │ │ └── favicon.ico │ ├── tinyxml.rst │ ├── testpages.rst │ ├── embeddedrst.rst │ ├── code │ │ ├── namespaces.h │ │ ├── nested_list_1.h │ │ ├── nested_list_3.h │ │ ├── nested_list_2.h │ │ ├── nested_list_4.h │ │ ├── nested_list_5.h │ │ ├── groups.h │ │ └── nutshell.h │ ├── autoindex.rst │ ├── inline.rst │ ├── autofile.rst │ ├── spelling_wordlist.txt │ ├── customcss.rst │ ├── define.rst │ ├── concept.rst │ ├── groups.rst │ ├── variable.rst │ ├── differences.rst │ ├── enum.rst │ ├── typedef.rst │ ├── members.rst │ ├── enumvalue.rst │ ├── union.rst │ ├── template.rst │ ├── page.rst │ ├── latexmath.rst │ └── credits.rst └── environment.yaml ├── tests ├── data │ ├── examples │ │ ├── test_alias │ │ │ ├── input.rst │ │ │ ├── extra_dox_opts.txt │ │ │ └── alias.h │ │ ├── test_c_file │ │ │ ├── input.rst │ │ │ └── c_file.h │ │ ├── test_class │ │ │ ├── input.rst │ │ │ └── class.cpp │ │ ├── test_image │ │ │ ├── input.rst │ │ │ ├── pixel.png │ │ │ ├── image.h │ │ │ └── compare.xml │ │ ├── test_links │ │ │ ├── input.rst │ │ │ ├── links.h │ │ │ └── compare.xml │ │ ├── test_lists │ │ │ └── input.rst │ │ ├── test_simplesect │ │ │ ├── input.rst │ │ │ └── simplesect.h │ │ ├── test_tables │ │ │ └── input.rst │ │ ├── test_dot_graphs │ │ │ ├── input.rst │ │ │ ├── dot_graphs.h │ │ │ └── dotfile.dot │ │ ├── test_html_entities │ │ │ ├── input.rst │ │ │ └── compare.xml │ │ ├── test_latexmath │ │ │ ├── input.rst │ │ │ ├── latexmath.h │ │ │ └── compare.xml │ │ ├── test_param_dirs │ │ │ ├── input.rst │ │ │ └── param_dirs.h │ │ ├── test_code_blocks │ │ │ ├── input.rst │ │ │ └── code_blocks.h │ │ ├── test_cpp_concept │ │ │ ├── input.rst │ │ │ ├── cpp_concept.h │ │ │ └── compare.xml │ │ ├── test_cpp_function │ │ │ ├── input.rst │ │ │ └── cpp_function.h │ │ ├── test_headings │ │ │ ├── extra_dox_opts.txt │ │ │ ├── input.rst │ │ │ └── headings.h │ │ ├── test_inheritance │ │ │ ├── input.rst │ │ │ └── inheritance.h │ │ ├── test_rst │ │ │ └── input.rst │ │ ├── test_diagrams │ │ │ ├── extra_dox_opts.txt │ │ │ ├── input.rst │ │ │ ├── diagrams_a.h │ │ │ ├── diagrams_b.h │ │ │ ├── diagrams_e.h │ │ │ ├── diagrams_c.h │ │ │ └── diagrams_d.h │ │ ├── test_inline │ │ │ ├── input.rst │ │ │ └── inline.h │ │ ├── test_qtsignalsandslots │ │ │ ├── input.rst │ │ │ └── qtsignalsandslots.h │ │ ├── test_template_function │ │ │ ├── input.rst │ │ │ └── template_function.h │ │ ├── test_array │ │ │ ├── input.rst │ │ │ └── array.h │ │ ├── test_cpp_inherited_members │ │ │ ├── extra_dox_opts.txt │ │ │ ├── input.rst │ │ │ └── cpp_inherited_members.h │ │ ├── test_template_type_alias │ │ │ ├── input.rst │ │ │ └── template_type_alias.h │ │ ├── test_membergroups │ │ │ ├── input.rst │ │ │ └── membergroups.h │ │ ├── test_cpp_trailing_return_type │ │ │ ├── input.rst │ │ │ └── cpp_trailing_return_type.h │ │ ├── test_union │ │ │ ├── input.rst │ │ │ └── union.h │ │ ├── test_group_content_only │ │ │ ├── input.rst │ │ │ ├── group_content_only.hpp │ │ │ └── compare.xml │ │ ├── test_template_class_non_type │ │ │ ├── input.rst │ │ │ └── template_class_non_type.h │ │ ├── test_xrefsect │ │ │ ├── extra_dox_opts.txt │ │ │ ├── input.rst │ │ │ └── xrefsect.h │ │ ├── test_userdefined │ │ │ ├── input.rst │ │ │ └── userdefined.h │ │ ├── test_group │ │ │ └── input.rst │ │ ├── test_cpp_friendclass │ │ │ ├── cpp_friendclass.h │ │ │ └── input.rst │ │ ├── test_define │ │ │ ├── input.rst │ │ │ └── define.h │ │ ├── test_cpp_enum │ │ │ ├── input.rst │ │ │ └── cpp_enum.h │ │ ├── test_group_member_ref │ │ │ ├── input.rst │ │ │ └── compare.xml │ │ ├── test_c_enum │ │ │ ├── input.rst │ │ │ └── c_enum.h │ │ └── doxyfile_template │ ├── auto │ │ ├── input.rst │ │ ├── auto_function.h │ │ └── auto_class.h │ ├── multi_project │ │ ├── A │ │ │ └── stuff.h │ │ ├── B │ │ │ └── stuff.h │ │ ├── C │ │ │ └── stuff.h │ │ └── input.rst │ ├── ellipsis.xml │ └── docutils.css ├── runtests.sh ├── warnings │ └── source │ │ ├── define.rst │ │ ├── index.rst │ │ ├── class.rst │ │ ├── group.rst │ │ ├── function.rst │ │ └── conf.py └── conftest.py ├── breathe ├── exception.py ├── __init__.py ├── path_handler.py ├── filetypes.py ├── renderer │ └── target.py ├── README.rst └── finder │ └── __init__.py ├── MANIFEST.in ├── breathe-apidoc.py ├── .github ├── dependabot.yml ├── FUNDING.yml └── workflows │ └── cache_doxygen.yml ├── .readthedocs.yaml ├── CONTRIBUTING.rst ├── .gitignore ├── Makefile ├── CONTRIBUTORS.rst ├── LICENSE ├── xml_parser_generator └── setuptools_builder.py └── .ruff.toml /examples/tinyxml/.gitignore: -------------------------------------------------------------------------------- 1 | tinyxml/ 2 | -------------------------------------------------------------------------------- /documentation/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /view 3 | /comparison 4 | -------------------------------------------------------------------------------- /tests/data/examples/test_alias/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: alias.h 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_c_file/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: c_file.h 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_class/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: class.h 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_image/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenclass:: ImageClass 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_links/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenclass:: LinksTest 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_lists/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: lists.h 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_simplesect/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfunction:: f 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_tables/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: tables.h 2 | -------------------------------------------------------------------------------- /examples/specific/c_union.h: -------------------------------------------------------------------------------- 1 | 2 | union ACUnion { 3 | int i; 4 | }; 5 | 6 | -------------------------------------------------------------------------------- /tests/data/examples/test_dot_graphs/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenpage:: dotgraphs 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_html_entities/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfunction:: noop 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_latexmath/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenclass:: MathHelper 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_param_dirs/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfunction:: process 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_code_blocks/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: code_blocks.h 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_concept/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenconcept:: Hashable 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_function/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: cpp_function.h 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_headings/extra_dox_opts.txt: -------------------------------------------------------------------------------- 1 | WARN_IF_DOC_ERROR = NO 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_inheritance/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: inheritance.h 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_rst/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenclass:: TestClass 2 | :members: 3 | -------------------------------------------------------------------------------- /tests/data/examples/test_diagrams/extra_dox_opts.txt: -------------------------------------------------------------------------------- 1 | ENABLE_PREPROCESSING = YES 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_diagrams/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenindex:: 2 | :allow-dot-graphs: 3 | -------------------------------------------------------------------------------- /tests/data/examples/test_inline/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenclass:: InlineTest 2 | :members: 3 | -------------------------------------------------------------------------------- /tests/data/examples/test_qtsignalsandslots/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: qtsignalsandslots.h 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_template_function/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: template_function.h 2 | -------------------------------------------------------------------------------- /examples/doxygen/example_test.cpp: -------------------------------------------------------------------------------- 1 | void main() 2 | { 3 | Test7 t; 4 | t.example(); 5 | } 6 | -------------------------------------------------------------------------------- /tests/data/examples/test_alias/extra_dox_opts.txt: -------------------------------------------------------------------------------- 1 | ALIASES = "sideeffect=\par Side Effects^^" 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_array/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfunction:: foo 2 | .. doxygenfunction:: bar 3 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_inherited_members/extra_dox_opts.txt: -------------------------------------------------------------------------------- 1 | INLINE_INHERITED_MEMB = YES 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_template_type_alias/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: template_type_alias.h 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_inherited_members/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: cpp_inherited_members.h 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_membergroups/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenclass:: GroupedMembers 2 | :members: 3 | -------------------------------------------------------------------------------- /tests/data/auto/input.rst: -------------------------------------------------------------------------------- 1 | .. autodoxygenfile:: auto_class.h 2 | .. autodoxygenfile:: auto_function.h 3 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_trailing_return_type/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: cpp_trailing_return_type.h 2 | -------------------------------------------------------------------------------- /tests/data/examples/test_union/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenunion:: SeparateUnion 2 | .. doxygennamespace:: foo 3 | -------------------------------------------------------------------------------- /tests/data/examples/test_group_content_only/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygengroup:: structy_group 2 | :content-only: 3 | -------------------------------------------------------------------------------- /breathe/exception.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | 4 | class BreatheError(Exception): 5 | pass 6 | -------------------------------------------------------------------------------- /examples/specific/c_macro.h: -------------------------------------------------------------------------------- 1 | 2 | #define A_C_MACRO "hello world" 3 | #define ANOTHER_C_MACRO(name) "hello" name 4 | -------------------------------------------------------------------------------- /examples/specific/imageExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breathe-doc/breathe/HEAD/examples/specific/imageExample.png -------------------------------------------------------------------------------- /tests/data/examples/test_template_class_non_type/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenclass:: anothertemplateclass 2 | :members: 3 | -------------------------------------------------------------------------------- /tests/runtests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export PYTHONPATH="../${PYTHONPATH:+:$PYTHONPATH}" 4 | 5 | python3 -m pytest -v 6 | -------------------------------------------------------------------------------- /examples/doxygen/diagrams_a.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIAGRAMS_A_H 2 | #define _DIAGRAMS_A_H 3 | class A { public: A *m_self; }; 4 | #endif 5 | -------------------------------------------------------------------------------- /tests/data/examples/test_xrefsect/extra_dox_opts.txt: -------------------------------------------------------------------------------- 1 | ALIASES = "xrefsample=\xrefitem xrefsample \"xref Sample\" \"xref Sample\" " 2 | -------------------------------------------------------------------------------- /documentation/source/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breathe-doc/breathe/HEAD/documentation/source/_static/favicon.ico -------------------------------------------------------------------------------- /examples/doxygen/diagrams_b.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIAGRAMS_B_H 2 | #define _DIAGRAMS_B_H 3 | class A; 4 | class B { public: A *m_a; }; 5 | #endif 6 | -------------------------------------------------------------------------------- /tests/data/examples/test_image/pixel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/breathe-doc/breathe/HEAD/tests/data/examples/test_image/pixel.png -------------------------------------------------------------------------------- /tests/data/examples/test_userdefined/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenclass:: UserDefinedGroupTest 2 | :members: 3 | :protected-members: 4 | -------------------------------------------------------------------------------- /examples/specific/c_struct.h: -------------------------------------------------------------------------------- 1 | 2 | struct ACStruct { 3 | int i; 4 | 5 | struct ANestedStruct { 6 | int i; 7 | }; 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /examples/specific/cpp_friendclass.h: -------------------------------------------------------------------------------- 1 | struct A {}; 2 | struct B {}; 3 | 4 | struct C { 5 | friend class A; 6 | friend struct B; 7 | }; 8 | -------------------------------------------------------------------------------- /tests/data/examples/test_group/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygengroup:: mygroup 2 | :members: 3 | .. doxygengroup:: innergroup 4 | :members: 5 | -------------------------------------------------------------------------------- /examples/doxygen/diagrams_e.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIAGRAM_E_H 2 | #define _DIAGRAM_E_H 3 | #include "diagrams_d.h" 4 | class E : public D {}; 5 | #endif 6 | -------------------------------------------------------------------------------- /tests/data/examples/test_diagrams/diagrams_a.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIAGRAMS_A_H 2 | #define _DIAGRAMS_A_H 3 | class A { public: A *m_self; }; 4 | #endif 5 | -------------------------------------------------------------------------------- /examples/specific/cpp_union.h: -------------------------------------------------------------------------------- 1 | 2 | union Union { 3 | int i; 4 | }; 5 | 6 | struct Class { 7 | union Union { 8 | int i; 9 | }; 10 | }; 11 | -------------------------------------------------------------------------------- /documentation/source/tinyxml.rst: -------------------------------------------------------------------------------- 1 | 2 | TinyXML Test Suite 3 | ================== 4 | 5 | .. cpp:namespace:: @ex_tinyxml 6 | 7 | .. doxygenindex:: 8 | 9 | -------------------------------------------------------------------------------- /tests/data/examples/test_diagrams/diagrams_b.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIAGRAMS_B_H 2 | #define _DIAGRAMS_B_H 3 | class A; 4 | class B { public: A *m_a; }; 5 | #endif 6 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_friendclass/cpp_friendclass.h: -------------------------------------------------------------------------------- 1 | struct A {}; 2 | struct B {}; 3 | 4 | struct C { 5 | friend class A; 6 | friend struct B; 7 | }; 8 | -------------------------------------------------------------------------------- /tests/data/examples/test_diagrams/diagrams_e.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIAGRAM_E_H 2 | #define _DIAGRAM_E_H 3 | #include "diagrams_d.h" 4 | class E : public D {}; 5 | #endif 6 | -------------------------------------------------------------------------------- /examples/specific/programlistinginclude.txt: -------------------------------------------------------------------------------- 1 | Vector boxCenter = interactionBox.center(); 2 | Vector max = interactionBox.max(); 3 | Vector diff = max - boxCenter; 4 | -------------------------------------------------------------------------------- /tests/data/examples/test_define/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygendefine:: USE_STUFF 2 | .. doxygendefine:: MAX_LENGTH 3 | .. doxygendefine:: MAXIMUM 4 | .. doxygendefine:: SWAP 5 | -------------------------------------------------------------------------------- /examples/specific/cpp_concept.h: -------------------------------------------------------------------------------- 1 | template 2 | concept Hashable = requires(T a) 3 | { 4 | { std::hash{}(a) } -> std::convertible_to; 5 | }; 6 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_friendclass/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenstruct:: A 2 | .. doxygenstruct:: B 3 | 4 | .. doxygenstruct:: C 5 | :members: 6 | :undoc-members: 7 | -------------------------------------------------------------------------------- /examples/doxygen/diagrams_c.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIAGRAMS_C_H 2 | #define _DIAGRAMS_C_H 3 | #include "diagrams_c.h" 4 | class D; 5 | class C : public A { public: D *m_d; }; 6 | #endif 7 | -------------------------------------------------------------------------------- /examples/specific/parameters.h: -------------------------------------------------------------------------------- 1 | 2 | /*! My function */ 3 | int f(int a, float b, int* c, int (*p)[3]); 4 | 5 | class MyClass {}; 6 | 7 | int g(MyClass a, MyClass* b); 8 | 9 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_enum/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenenum:: Unscoped 2 | .. doxygenenum:: ScopedStruct 3 | .. doxygenenum:: ScopedClass 4 | .. doxygenenum:: ScopedClassNoUnderlying 5 | -------------------------------------------------------------------------------- /tests/data/examples/test_headings/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenclass:: HeadingsTest1 2 | .. doxygenclass:: HeadingsTest2 3 | .. doxygenclass:: HeadingsTest3 4 | .. doxygenclass:: HeadingsTest4 5 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include xml_parser_generator *.py *.in *.json 2 | include requirements/*.txt tests/*.py 3 | graft tests/data 4 | exclude breathe/_parser.py 5 | global-exclude *.py[cod] -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_concept/cpp_concept.h: -------------------------------------------------------------------------------- 1 | template 2 | concept Hashable = requires(T a) 3 | { 4 | { std::hash{}(a) } -> std::convertible_to; 5 | }; 6 | -------------------------------------------------------------------------------- /tests/data/examples/test_group_member_ref/input.rst: -------------------------------------------------------------------------------- 1 | The XML output of Doxygen changed in 1.9.7, see 2 | https://github.com/breathe-doc/breathe/pull/934 3 | 4 | 5 | .. doxygenfunction:: func2 -------------------------------------------------------------------------------- /tests/data/examples/test_diagrams/diagrams_c.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIAGRAMS_C_H 2 | #define _DIAGRAMS_C_H 3 | #include "diagrams_c.h" 4 | class D; 5 | class C : public A { public: D *m_d; }; 6 | #endif 7 | -------------------------------------------------------------------------------- /examples/specific/auto_function.h: -------------------------------------------------------------------------------- 1 | 2 | //! \brief non-namespaced class function 3 | void autoFunction() {}; 4 | 5 | //! \brief non-namespaced class other function 6 | void anotherAutoFunction() {}; 7 | -------------------------------------------------------------------------------- /tests/data/auto/auto_function.h: -------------------------------------------------------------------------------- 1 | 2 | //! \brief non-namespaced class function 3 | void autoFunction() {}; 4 | 5 | //! \brief non-namespaced class other function 6 | void anotherAutoFunction() {}; 7 | -------------------------------------------------------------------------------- /tests/data/examples/test_param_dirs/param_dirs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @param[in] i Input 3 | * @param[out] o Output 4 | * @param[in,out] io Input and output 5 | */ 6 | int process(void *i, void *o, void *io); 7 | -------------------------------------------------------------------------------- /breathe-apidoc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from __future__ import annotations 3 | 4 | import sys 5 | 6 | if __name__ == "__main__": 7 | from breathe.apidoc import main 8 | 9 | sys.exit(main()) 10 | -------------------------------------------------------------------------------- /examples/specific/cpp_anon.h: -------------------------------------------------------------------------------- 1 | struct ClassWithAnonEntities { 2 | struct { 3 | int structMember; 4 | }; 5 | 6 | union { 7 | int unionMember; 8 | }; 9 | 10 | enum { 11 | Enumerator 12 | }; 13 | }; 14 | -------------------------------------------------------------------------------- /tests/data/examples/test_xrefsect/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfile:: xrefsect.h 2 | 3 | .. doxygenpage:: todo 4 | .. doxygenpage:: bug 5 | .. doxygenpage:: test 6 | .. doxygenpage:: deprecated 7 | .. doxygenpage:: xrefsample 8 | -------------------------------------------------------------------------------- /documentation/source/testpages.rst: -------------------------------------------------------------------------------- 1 | 2 | Test Pages 3 | ========== 4 | 5 | .. toctree:: 6 | :maxdepth: 1 7 | 8 | doxygen 9 | tinyxml 10 | specific 11 | embeddedrst 12 | inline 13 | members 14 | -------------------------------------------------------------------------------- /examples/doxygen/diagrams_d.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIAGRAM_D_H 2 | #define _DIAGRAM_D_H 3 | #include "diagrams_a.h" 4 | #include "diagrams_b.h" 5 | class C; 6 | class D : virtual protected A, private B { public: C m_c; }; 7 | #endif 8 | -------------------------------------------------------------------------------- /examples/doxygen/tag.cpp: -------------------------------------------------------------------------------- 1 | /*! A class that is inherited from the external class Test13. 2 | */ 3 | 4 | class Tag : public Test13 5 | { 6 | public: 7 | /*! an overloaded member. */ 8 | void example(); 9 | }; 10 | -------------------------------------------------------------------------------- /documentation/source/embeddedrst.rst: -------------------------------------------------------------------------------- 1 | 2 | Embedded ReStructuredText 3 | ========================= 4 | 5 | .. cpp:namespace:: @ex_embedded_rst 6 | 7 | .. doxygenindex:: 8 | :path: ../../examples/specific/rst/xml 9 | 10 | -------------------------------------------------------------------------------- /examples/doxygen/class.h: -------------------------------------------------------------------------------- 1 | /* A dummy class */ 2 | 3 | class Test3 4 | { 5 | }; 6 | 7 | /*! \class Test class.h "inc/class.h" 8 | * \brief This is a test class. 9 | * 10 | * Some details about the Test class 11 | */ 12 | -------------------------------------------------------------------------------- /examples/specific/cpp_constexpr_hax.h: -------------------------------------------------------------------------------- 1 | [[nodiscard]] constexpr static auto f1(std::false_type) {} 2 | [[nodiscard]] static constexpr auto f2(std::false_type) {} 3 | 4 | constexpr static int v1 = 42; 5 | static constexpr int v2 = 42; 6 | -------------------------------------------------------------------------------- /examples/specific/fixedwidthfont.h: -------------------------------------------------------------------------------- 1 | 2 | class Out 3 | { 4 | public: 5 | 6 | //! \b Constructor \a for Out object 7 | Out() {} 8 | 9 | //! \a Destructor \b for Out object 10 | ~Out() {} 11 | 12 | }; 13 | 14 | -------------------------------------------------------------------------------- /examples/specific/.gitignore: -------------------------------------------------------------------------------- 1 | /functypedef 2 | /alias 3 | /class 4 | /inline 5 | /nutshell 6 | /rst 7 | /typedef 8 | /members 9 | /image 10 | /decl_impl 11 | */doxygen_sqlite3.db 12 | */xml/*.xml 13 | */xml/*.xsd 14 | */xml/*.xslt 15 | -------------------------------------------------------------------------------- /tests/data/examples/test_diagrams/diagrams_d.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIAGRAM_D_H 2 | #define _DIAGRAM_D_H 3 | #include "diagrams_a.h" 4 | #include "diagrams_b.h" 5 | class C; 6 | class D : virtual protected A, private B { public: C m_c; }; 7 | #endif 8 | -------------------------------------------------------------------------------- /examples/specific/multifile/one/Util.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | namespace test { 4 | 5 | typedef float MyFloat; 6 | 7 | void TestFunc() {}; 8 | 9 | } 10 | 11 | class TestClass { 12 | public: 13 | /// enum docs 14 | enum Enum {}; 15 | }; 16 | -------------------------------------------------------------------------------- /examples/doxygen/file.h: -------------------------------------------------------------------------------- 1 | /** \file file.h 2 | * A brief file description. 3 | * A more elaborated file description. 4 | */ 5 | 6 | /** 7 | * A global integer value. 8 | * More details about this value. 9 | */ 10 | extern int globalValue; 11 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "monthly" 7 | groups: 8 | github-actions: 9 | patterns: 10 | - "*" 11 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | python: 4 | version: 3 5 | 6 | sphinx: 7 | builder: html 8 | configuration: documentation/source/conf.py 9 | fail_on_warning: false 10 | 11 | conda: 12 | environment: documentation/environment.yaml 13 | -------------------------------------------------------------------------------- /examples/specific/cpp_trailing_return_type.h: -------------------------------------------------------------------------------- 1 | /*! \file cpp_trailing_return_type.h */ 2 | 3 | /*! needed for references in global function return type */ 4 | class Thingy {}; 5 | 6 | //! \brief Function that creates a thingy. 7 | auto f_issue_441() -> Thingy*; 8 | -------------------------------------------------------------------------------- /examples/specific/inheritance.h: -------------------------------------------------------------------------------- 1 | 2 | class BaseA {}; 3 | class BaseB {}; 4 | 5 | /*! \brief This is the main class we're interested in */ 6 | class Main : public BaseA, BaseB {}; 7 | 8 | class ChildA : public Main {}; 9 | class ChildB : public Main {}; 10 | -------------------------------------------------------------------------------- /tests/data/multi_project/A/stuff.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Doc for fun1 in project A 4 | */ 5 | void fun1(); 6 | 7 | /** 8 | * Doc for fun2 in project A 9 | */ 10 | void fun2(); 11 | 12 | /** 13 | * Unique function for project A 14 | */ 15 | void funA(); 16 | 17 | -------------------------------------------------------------------------------- /tests/data/multi_project/B/stuff.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Doc for fun1 in project B 4 | */ 5 | void fun1(); 6 | 7 | /** 8 | * Doc for fun2 in project B 9 | */ 10 | void fun2(); 11 | 12 | /** 13 | * Unique function for project B 14 | */ 15 | void funB(); 16 | 17 | -------------------------------------------------------------------------------- /tests/data/multi_project/C/stuff.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Doc for fun1 in project C 4 | */ 5 | void fun1(); 6 | 7 | /** 8 | * Doc for fun2 in project C 9 | */ 10 | void fun2(); 11 | 12 | /** 13 | * Unique function for project C 14 | */ 15 | void funC(); 16 | 17 | -------------------------------------------------------------------------------- /examples/specific/class.cpp: -------------------------------------------------------------------------------- 1 | #include "class.h" 2 | 3 | /*! More documentation in the impl file */ 4 | void ClassTest::function(int myIntParameter) 5 | { 6 | } 7 | 8 | /*! More documentation in the impl file */ 9 | void ClassTest::anotherFunction() 10 | { 11 | } 12 | 13 | -------------------------------------------------------------------------------- /examples/specific/links.h: -------------------------------------------------------------------------------- 1 | 2 | /*! \brief first struct inside of namespace 3 | 4 | This is a longer description with a link to a webpage 5 | in the text https://github.com in order to test out Breathe's 6 | handling of links. 7 | 8 | */ 9 | class LinksTest {}; 10 | -------------------------------------------------------------------------------- /tests/data/examples/test_class/class.cpp: -------------------------------------------------------------------------------- 1 | #include "class.h" 2 | 3 | /*! More documentation in the impl file */ 4 | void ClassTest::function(int myIntParameter) 5 | { 6 | } 7 | 8 | /*! More documentation in the impl file */ 9 | void ClassTest::anotherFunction() 10 | { 11 | } 12 | 13 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_trailing_return_type/cpp_trailing_return_type.h: -------------------------------------------------------------------------------- 1 | /*! \file cpp_trailing_return_type.h */ 2 | 3 | /*! needed for references in global function return type */ 4 | class Thingy {}; 5 | 6 | //! \brief Function that creates a thingy. 7 | auto f_issue_441() -> Thingy*; 8 | -------------------------------------------------------------------------------- /tests/data/examples/test_links/links.h: -------------------------------------------------------------------------------- 1 | 2 | /*! \brief first struct inside of namespace 3 | 4 | This is a longer description with a link to a webpage 5 | in the text http://www.github.com in order to test out Breathe's 6 | handling of links. 7 | 8 | */ 9 | class LinksTest {}; 10 | -------------------------------------------------------------------------------- /examples/specific/auto_class.h: -------------------------------------------------------------------------------- 1 | 2 | //! \brief class outside of namespace 3 | class AutoClassTest { 4 | 5 | //! \brief non-namespaced class function 6 | void member() {}; 7 | 8 | //! \brief non-namespaced class other function 9 | void anotherMember() {}; 10 | }; 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/data/auto/auto_class.h: -------------------------------------------------------------------------------- 1 | 2 | //! \brief class outside of namespace 3 | class AutoClassTest { 4 | 5 | //! \brief non-namespaced class function 6 | void member() {}; 7 | 8 | //! \brief non-namespaced class other function 9 | void anotherMember() {}; 10 | }; 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/specific/multifile/two/Util.h: -------------------------------------------------------------------------------- 1 | #include "../one/Util.h" 2 | 3 | namespace test { 4 | 5 | typedef int MyInt; 6 | 7 | struct TestStruct {}; 8 | 9 | } 10 | 11 | /// The non-type template parameter references a different file 12 | template void TestTemplateFunction(); 13 | -------------------------------------------------------------------------------- /examples/specific/cpp_enum.h: -------------------------------------------------------------------------------- 1 | enum Unscoped : int { 2 | UnscopedEnumerator = 42 3 | }; 4 | 5 | enum struct ScopedStruct : int { 6 | Enumerator = 42 7 | }; 8 | 9 | enum class ScopedClass : int { 10 | Enumerator = 42 11 | }; 12 | 13 | enum class ScopedClassNoUnderlying { 14 | Enumerator = 42 15 | }; 16 | -------------------------------------------------------------------------------- /examples/specific/cpp_inherited_members.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | */ 4 | 5 | /// Base class 6 | class Base 7 | { 8 | public: 9 | /// Base-class member function 10 | void f_issue_356(); 11 | }; 12 | 13 | /// Class A 14 | class A : public Base {}; 15 | /// Class B 16 | class B : public Base {}; 17 | -------------------------------------------------------------------------------- /tests/warnings/source/define.rst: -------------------------------------------------------------------------------- 1 | 2 | Define Warnings 3 | =============== 4 | 5 | Test 'cannot find project' warning. 6 | 7 | .. doxygendefine:: MY_DEFINE 8 | :project: nonexistent 9 | 10 | Test 'cannot find define' warning. 11 | 12 | .. doxygendefine:: MY_DEFINE 13 | :project: class 14 | 15 | -------------------------------------------------------------------------------- /examples/specific/headings.h: -------------------------------------------------------------------------------- 1 | /*! \brief This is a documentation 2 | 3 | This is more documentation. 4 | 5 |

Header

6 | Text 7 | 8 |

Header Bold Header Text

9 | Text 10 | 11 | Header 12 | --------- 13 | Text 14 | 15 | ### Header ### 16 | Text 17 | */ 18 | class HeadingsTest {}; 19 | -------------------------------------------------------------------------------- /examples/doxygen/enum.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Enum Command" 2 | OUTPUT_DIRECTORY = enum 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = enum.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/file.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "File Command" 2 | OUTPUT_DIRECTORY = file 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = file.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/func.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Fn Command" 2 | OUTPUT_DIRECTORY = func 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = func.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/par.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Par Command" 2 | OUTPUT_DIRECTORY = par 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = par.cpp 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/latexmath.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @brief A class 4 | * 5 | * A inline formula: \f$ f(x) = a + b \f$ 6 | * 7 | * A display style formula: 8 | * @f[ 9 | * \int_a^b f(x) dx = F(b) - F(a) 10 | * @f] 11 | */ 12 | class MathHelper 13 | { 14 | public: 15 | MathHelper() {} 16 | ~MathHelper() {} 17 | } 18 | 19 | -------------------------------------------------------------------------------- /examples/specific/template_class.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Template Class" 2 | OUTPUT_DIRECTORY = template_class 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = template_class.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/union.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Union" 2 | OUTPUT_DIRECTORY = union 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = union.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_enum/cpp_enum.h: -------------------------------------------------------------------------------- 1 | enum Unscoped : int { 2 | UnscopedEnumerator = 42 3 | }; 4 | 5 | enum struct ScopedStruct : int { 6 | Enumerator = 42 7 | }; 8 | 9 | enum class ScopedClass : int { 10 | Enumerator = 42 11 | }; 12 | 13 | enum class ScopedClassNoUnderlying { 14 | Enumerator = 42 15 | }; 16 | -------------------------------------------------------------------------------- /examples/doxygen/class.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Class Command" 2 | OUTPUT_DIRECTORY = class 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = class.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/group.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Grouping" 2 | OUTPUT_DIRECTORY = group 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = group.cpp 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/interface.h: -------------------------------------------------------------------------------- 1 | /* A dummy interface, which is really just a specially treated class in C++ */ 2 | 3 | class TestInterface 4 | { 5 | }; 6 | 7 | /*! \interface TestInterface interface.h "inc/interface.h" 8 | * \brief This is a test interface. 9 | * 10 | * Some details about the TestInterface interface 11 | */ 12 | -------------------------------------------------------------------------------- /examples/doxygen/page.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Page Command" 2 | OUTPUT_DIRECTORY = page 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = page.doc 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/c_enum.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C Enum" 2 | OUTPUT_DIRECTORY = c_enum 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = c_enum.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/c_macro.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C Macro" 2 | OUTPUT_DIRECTORY = c_macro 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = c_macro.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/enum.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Enum Command" 2 | OUTPUT_DIRECTORY = enum 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = enum.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/links.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Links Command" 2 | OUTPUT_DIRECTORY = links 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = links.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/lists.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Lists Option" 2 | OUTPUT_DIRECTORY = lists 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = lists.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/author.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Author Command" 2 | OUTPUT_DIRECTORY = author 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = author.cpp 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/qtstyle.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Qt Style" 2 | OUTPUT_DIRECTORY = qtstyle 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = qtstyle.cpp 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/templ.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Template Test" 2 | OUTPUT_DIRECTORY = template 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = templ.cpp 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/alias.h: -------------------------------------------------------------------------------- 1 | 2 | /*! @file alias.h */ 3 | 4 | /** 5 | * Foo frob routine. 6 | * \par bob this something else 7 | * @sideeffect Frobs any foos. 8 | * 9 | * \par bob this something else 10 | * 11 | * @sideeffect Frobs any foos. 12 | * 13 | * @param[out] Frobs any foos. 14 | */ 15 | void frob_foos(void* Frobs); 16 | -------------------------------------------------------------------------------- /examples/specific/cpp_enum.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C++ Enum" 2 | OUTPUT_DIRECTORY = cpp_enum 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = cpp_enum.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/define.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Define example" 2 | OUTPUT_DIRECTORY = define 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = define.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/headings.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Headings" 2 | OUTPUT_DIRECTORY = headings 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = headings.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/image.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a class with an image in the description. It renders like this: 3 | * 4 | * \image HTML imageExample.png 5 | * 6 | * Breathe & Sphinx should automatically copy the image from the doxygen output directory into the 7 | * _images folder of the Sphinx output. 8 | */ 9 | class ImageClass {}; 10 | -------------------------------------------------------------------------------- /examples/specific/tables.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Tables Option" 2 | OUTPUT_DIRECTORY = tables 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = tables.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/template_function.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Template Function" 2 | OUTPUT_DIRECTORY = template_function 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = template_function.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_inherited_members/cpp_inherited_members.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | */ 4 | 5 | /// Base class 6 | class Base 7 | { 8 | public: 9 | /// Base-class member function 10 | void f_issue_356(); 11 | }; 12 | 13 | /// Class A 14 | class A : public Base {}; 15 | /// Class B 16 | class B : public Base {}; 17 | -------------------------------------------------------------------------------- /examples/doxygen/concept.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Concept Command" 2 | OUTPUT_DIRECTORY = concept 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = concept.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/pyexample.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Python" 2 | OUTPUT_DIRECTORY = pyexample 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | OPTIMIZE_OUTPUT_JAVA = YES 7 | INPUT = pyexample.py 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/relates.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Relates Command" 2 | OUTPUT_DIRECTORY = relates 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = relates.cpp 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/auto.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Auto" 2 | OUTPUT_DIRECTORY = auto 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = auto_class.h auto_function.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/decl_impl.cpp: -------------------------------------------------------------------------------- 1 | /*! More detailed description 2 | 3 | Yeah and some more. 4 | */ 5 | int open_di(const char * pathname, int flags) { 6 | return 0; 7 | } 8 | 9 | namespace testnamespace { 10 | 11 | /*! Even more documentation. */ 12 | int another_open_di(const char *,int) 13 | { 14 | return 0; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /examples/specific/interface.h: -------------------------------------------------------------------------------- 1 | /* A dummy interface, which is really just a specially treated class in C++ */ 2 | 3 | class InterfaceClass 4 | { 5 | }; 6 | 7 | /*! \interface InterfaceClass interface.h "inc/interface.h" 8 | * \brief This is a test interface class. 9 | * 10 | * Some details about the InterfaceClass interface 11 | */ 12 | -------------------------------------------------------------------------------- /examples/specific/members.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Members Option" 2 | OUTPUT_DIRECTORY = members 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = members.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /tests/data/examples/test_image/image.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a class with an image in the description. It renders like this: 3 | * 4 | * \image HTML pixel.png 5 | * 6 | * Breathe & Sphinx should automatically copy the image from the doxygen output directory into the 7 | * _images folder of the Sphinx output. 8 | */ 9 | class ImageClass {}; 10 | -------------------------------------------------------------------------------- /examples/doxygen/afterdoc.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "AfterDocs" 2 | OUTPUT_DIRECTORY = afterdoc 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = afterdoc.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/interface.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Interface Command" 2 | OUTPUT_DIRECTORY = interface 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = interface.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/jdstyle.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "JavaDoc Style" 2 | OUTPUT_DIRECTORY = jdstyle 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = jdstyle.cpp 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/parblock.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Parblock Command" 2 | OUTPUT_DIRECTORY = parblock 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = parblock.cpp 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/inline.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Inline Parameter Doc Test" 2 | OUTPUT_DIRECTORY = inline 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = inline.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/simplesect.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Simplesect" 2 | OUTPUT_DIRECTORY = simplesect 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = simplesect.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/template_type_alias.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Template Type Alias" 2 | OUTPUT_DIRECTORY = template_type_alias 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = template_type_alias.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/using_in_ns.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "UsingInNS" 2 | OUTPUT_DIRECTORY = using_in_ns 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = using_in_ns.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /tests/data/examples/test_latexmath/latexmath.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @brief A class 4 | * 5 | * A inline formula: \f$ f(x) = a + b \f$ 6 | * 7 | * A display style formula: 8 | * @f[ 9 | * \int_a^b f(x) dx = F(b) - F(a) 10 | * @f] 11 | */ 12 | class MathHelper 13 | { 14 | public: 15 | MathHelper() {} 16 | ~MathHelper() {} 17 | } 18 | 19 | -------------------------------------------------------------------------------- /examples/doxygen/structcmd.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Structural commands" 2 | OUTPUT_DIRECTORY = structcmd 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = structcmd.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/code_blocks.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Code Blocks" 2 | OUTPUT_DIRECTORY = code_blocks 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = code_blocks.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/cpp_concept.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C++ Concept" 2 | OUTPUT_DIRECTORY = cpp_concept 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = cpp_concept.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/headerfile.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Headerfile Command" 2 | OUTPUT_DIRECTORY = headerfile 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = headerfile.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/image.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Image Test" 2 | OUTPUT_DIRECTORY = image 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = image.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | IMAGE_PATH = . 13 | -------------------------------------------------------------------------------- /examples/specific/inheritance.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Inheritance" 2 | OUTPUT_DIRECTORY = inheritance 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = inheritance.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/interface.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Interface Command" 2 | OUTPUT_DIRECTORY = interface 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = interface.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/latexmath.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Latex Math Option" 2 | OUTPUT_DIRECTORY = latexmath 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = latexmath.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /tests/data/examples/test_alias/alias.h: -------------------------------------------------------------------------------- 1 | 2 | /*! @file alias.h */ 3 | 4 | /** 5 | * Foo frob routine. 6 | * \par bob this something else 7 | * @sideeffect Frobs any foos. 8 | * 9 | * \par bob this something else 10 | * 11 | * @sideeffect Frobs any foos. 12 | * 13 | * @param[out] Frobs any foos. 14 | */ 15 | void frob_foos(void* Frobs); 16 | -------------------------------------------------------------------------------- /tests/data/examples/test_group_content_only/group_content_only.hpp: -------------------------------------------------------------------------------- 1 | 2 | /// @defgroup structy_group StructyGroup 3 | /// @{ 4 | 5 | 6 | /// Hello 7 | typedef struct { 8 | const unsigned char* data_1; 9 | unsigned int size_1; 10 | const unsigned char* data_2; 11 | unsigned int size_2; 12 | } Structy; 13 | 14 | 15 | /// @} 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/doxygen/autolink.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Automatic link generation" 2 | OUTPUT_DIRECTORY = autolink 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = autolink.cpp 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/restypedef.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Resolving Typedefs" 2 | OUTPUT_DIRECTORY = restypedef 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = restypedef.cpp 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/c_typedef.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Function Type Def Command" 2 | OUTPUT_DIRECTORY = c_typedef 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = c_typedef.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/membergroups.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Member Groups" 2 | OUTPUT_DIRECTORY = membergroups 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = membergroups.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/nutshell.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Breathe in a nutshell example" 2 | OUTPUT_DIRECTORY = nutshell 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = nutshell.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/array.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Array Command" 2 | OUTPUT_DIRECTORY = array 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = array.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | OPTIMIZE_OUTPUT_FOR_C = YES -------------------------------------------------------------------------------- /examples/specific/template_class_non_type.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Template Class Non Type" 2 | OUTPUT_DIRECTORY = template_class_non_type 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = template_class_non_type.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/define.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Define Command" 2 | OUTPUT_DIRECTORY = define 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = define.h 8 | ENABLE_PREPROCESSING = YES 9 | QUIET = YES 10 | JAVADOC_AUTOBRIEF = YES 11 | GENERATE_HTML = NO 12 | GENERATE_XML = YES 13 | -------------------------------------------------------------------------------- /examples/specific/array.h: -------------------------------------------------------------------------------- 1 | 2 | /** My function */ 3 | int foo(int a[5]); 4 | 5 | /** My other function 6 | * 7 | * @test This declaration is supposed to be 8 | * @code{.c} 9 | * int bar(int n, int a[static n]); 10 | * @endcode 11 | * But, Sphinx fails to recognize `int a[static n])` as a C specific array syntax 12 | */ 13 | int bar(int n, int a[]); 14 | -------------------------------------------------------------------------------- /examples/specific/enum.h: -------------------------------------------------------------------------------- 1 | 2 | namespace TestEnumNamespace { 3 | 4 | //! \brief enum inside of namespace 5 | enum NamespacedEnumTest { 6 | 7 | //! \brief namespaced enum value 8 | FIRST, 9 | SECOND 10 | }; 11 | 12 | } 13 | 14 | //! \brief enum outside of namespace 15 | enum EnumTest { 16 | 17 | //! \brief enum value 18 | VALUE 19 | }; 20 | -------------------------------------------------------------------------------- /examples/doxygen/docstring.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Python" 2 | OUTPUT_DIRECTORY = docstring 3 | EXTRACT_ALL = YES 4 | GENERATE_LATEX = NO 5 | GENERATE_MAN = NO 6 | GENERATE_RTF = NO 7 | OPTIMIZE_OUTPUT_JAVA = YES 8 | INPUT = docstring.py 9 | QUIET = YES 10 | JAVADOC_AUTOBRIEF = YES 11 | GENERATE_HTML = NO 12 | GENERATE_XML = YES 13 | -------------------------------------------------------------------------------- /examples/specific/c_union.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C Union" 2 | OUTPUT_DIRECTORY = c_union 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = c_union.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/specific/cpp_constexpr_hax.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Constexpr Hax" 2 | OUTPUT_DIRECTORY = cpp_constexpr_hax 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = cpp_constexpr_hax.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/cpp_ns_template_specialization.h: -------------------------------------------------------------------------------- 1 | namespace ns1 { 2 | struct Foo { 3 | int value; 4 | }; 5 | } // namespace ns1 6 | 7 | namespace ns2 { 8 | template struct Trait { 9 | static constexpr bool valid = false; 10 | }; 11 | 12 | template <> struct Trait { 13 | static constexpr bool valid = true; 14 | }; 15 | } // namespace ns2 16 | -------------------------------------------------------------------------------- /examples/specific/decl_impl.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Declaration/Implementation" 2 | OUTPUT_DIRECTORY = decl_impl 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = decl_impl.h decl_impl.cpp 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/functionOverload.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Function Overload" 2 | OUTPUT_DIRECTORY = functionOverload 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = functionOverload.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/doxygen/overload.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Overloaded Command" 2 | OUTPUT_DIRECTORY = overload 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | SORT_MEMBER_DOCS = NO 8 | INPUT = overload.cpp 9 | QUIET = YES 10 | JAVADOC_AUTOBRIEF = YES 11 | GENERATE_HTML = NO 12 | GENERATE_XML = YES 13 | -------------------------------------------------------------------------------- /examples/specific/c_file.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C File Example" 2 | OUTPUT_DIRECTORY = c_file 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = c_file.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/specific/c_struct.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C Struct" 2 | OUTPUT_DIRECTORY = c_struct 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = c_struct.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/specific/cpp_union.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C++ Union" 2 | OUTPUT_DIRECTORY = cpp_union 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = cpp_union.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/specific/struct.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Struct Command" 2 | OUTPUT_DIRECTORY = struct 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = struct.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /tests/data/examples/test_array/array.h: -------------------------------------------------------------------------------- 1 | 2 | /** My function */ 3 | int foo(int a[5]); 4 | 5 | /** My other function 6 | * 7 | * @test This declaration is supposed to be 8 | * @code{.c} 9 | * int bar(int n, int a[static n]); 10 | * @endcode 11 | * But, Sphinx fails to recognize `int a[static n])` as a C specific array syntax 12 | */ 13 | int bar(int n, int a[]); 14 | -------------------------------------------------------------------------------- /examples/doxygen/include.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Include Command" 2 | OUTPUT_DIRECTORY = include 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = include.cpp 8 | EXAMPLE_PATH = example_test.cpp 9 | QUIET = YES 10 | JAVADOC_AUTOBRIEF = YES 11 | GENERATE_HTML = NO 12 | GENERATE_XML = YES 13 | -------------------------------------------------------------------------------- /examples/doxygen/tag.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Tag Files" 2 | OUTPUT_DIRECTORY = tag 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = tag.cpp 8 | TAGFILES = example.tag=../../example/html 9 | QUIET = YES 10 | JAVADOC_AUTOBRIEF = YES 11 | GENERATE_HTML = NO 12 | GENERATE_XML = YES 13 | -------------------------------------------------------------------------------- /examples/specific/class.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Class Command" 2 | OUTPUT_DIRECTORY = class 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = class.h class.cpp 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/specific/cpp_anon.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C++ Anonymous" 2 | OUTPUT_DIRECTORY = cpp_anon 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = cpp_anon.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/specific/cpp_function_lookup.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C++ Function Lookup" 2 | OUTPUT_DIRECTORY = cpp_function_lookup 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = cpp_function_lookup.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/struct_function.h: -------------------------------------------------------------------------------- 1 | 2 | namespace testnamespace { 3 | 4 | //! \brief templated struct with functions 5 | template 6 | struct MyClass 7 | { 8 | //! \brief struct empty constructor 9 | MyClass(); 10 | 11 | //! \brief struct copy constructor 12 | MyClass(const MyClass&); 13 | 14 | int myMemberVar; 15 | }; 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /tests/warnings/source/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Test Breathe Warnings 3 | ===================== 4 | 5 | This Sphinx instance is designed to call Breathe in every single incorrect way 6 | in order to test that the warnings work without crashing the build process. 7 | 8 | .. toctree:: 9 | :maxdepth: 2 10 | 11 | class 12 | function 13 | group 14 | define 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/doxygen/.gitignore: -------------------------------------------------------------------------------- 1 | afterdoc 2 | author 3 | autolink 4 | class 5 | concept 6 | define 7 | diagrams 8 | docstring 9 | enum 10 | example 11 | file 12 | func 13 | group 14 | include 15 | jdstyle 16 | manual 17 | memgrp 18 | overload 19 | page 20 | par 21 | parblock 22 | pyexample 23 | qtstyle 24 | relates 25 | restypedef 26 | structcmd 27 | tag 28 | template 29 | interface 30 | -------------------------------------------------------------------------------- /examples/specific/typedef.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Function Type Def Command" 2 | OUTPUT_DIRECTORY = typedef 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = typedef.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /documentation/source/code/namespaces.h: -------------------------------------------------------------------------------- 1 | 2 | /*! A namespace for nothing. */ 3 | namespace test_namespace { 4 | 5 | /*! A very important class. */ 6 | class Sample1 7 | { 8 | public: 9 | Sample1() {} 10 | }; 11 | 12 | /*! Even more important class */ 13 | class Sample2 14 | { 15 | Sample2() {} 16 | }; 17 | 18 | /*! A function in the namespace */ 19 | void foo() {} 20 | 21 | } 22 | -------------------------------------------------------------------------------- /examples/doxygen/concept.h: -------------------------------------------------------------------------------- 1 | template 2 | concept Hashable = requires(T a) 3 | { 4 | { std::hash{}(a) } -> std::convertible_to; 5 | }; 6 | 7 | /*! \concept Hashable concept.h "inc/concept.h" 8 | * \brief This is a test concept. 9 | * 10 | * It was stolen from the first example from 11 | * https://en.cppreference.com/w/cpp/language/constraints 12 | */ 13 | -------------------------------------------------------------------------------- /examples/specific/cpp_function.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C++ Function" 2 | OUTPUT_DIRECTORY = cpp_function 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = cpp_function.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/doxygen/relates.cpp: -------------------------------------------------------------------------------- 1 | /*! 2 | * A String class. 3 | */ 4 | 5 | class String 6 | { 7 | friend int strcmp(const String &,const String &); 8 | }; 9 | 10 | /*! 11 | * Compares two strings. 12 | */ 13 | 14 | int strcmp(const String &s1,const String &s2) 15 | { 16 | } 17 | 18 | /*! \relates String 19 | * A string debug function. 20 | */ 21 | void stringDebug() 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /examples/specific/alias.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "ALIAS Example" 2 | OUTPUT_DIRECTORY = alias 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = alias.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | ALIASES = "sideeffect=\par Side Effects^^" 13 | -------------------------------------------------------------------------------- /examples/specific/name.cfg: -------------------------------------------------------------------------------- 1 | # For a case where Breathe was failing on the doxygen output 2 | 3 | PROJECT_NAME = "Name Test" 4 | OUTPUT_DIRECTORY = name 5 | GENERATE_LATEX = NO 6 | GENERATE_MAN = NO 7 | GENERATE_RTF = NO 8 | CASE_SENSE_NAMES = NO 9 | INPUT = name.h 10 | QUIET = YES 11 | JAVADOC_AUTOBRIEF = YES 12 | GENERATE_HTML = NO 13 | GENERATE_XML = YES 14 | -------------------------------------------------------------------------------- /examples/specific/namespacefile.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Namespace in file" 2 | OUTPUT_DIRECTORY = namespacefile 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = namespacefile.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/specific/template_specialisation.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Template Specialisation" 2 | OUTPUT_DIRECTORY = template_specialisation 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = template_specialisation.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/cpp_friendclass.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C++ Friend Class" 2 | OUTPUT_DIRECTORY = cpp_friendclass 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = cpp_friendclass.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/specific/cpp_trailing_return_type.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C++ Trailing Return Type" 2 | OUTPUT_DIRECTORY = cpp_trailing_return_type 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = cpp_trailing_return_type.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | -------------------------------------------------------------------------------- /examples/specific/membergroups.h: -------------------------------------------------------------------------------- 1 | //! \brief demonstrates member groups 2 | class GroupedMembers { 3 | 4 | public: 5 | 6 | ///@{ @name myGroup 7 | void in_mygroup_one(int myParameter); ///< A function 8 | void in_mygroup_two(int myParameter); ///< Another function 9 | ///@} 10 | 11 | void not_in_mygroup(int myParameter); ///< This one is not in myGroup 12 | 13 | }; 14 | -------------------------------------------------------------------------------- /examples/specific/multifile.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Multifile" 2 | OUTPUT_DIRECTORY = multifilexml 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = multifile 8 | RECURSIVE = YES 9 | QUIET = YES 10 | JAVADOC_AUTOBRIEF = YES 11 | GENERATE_HTML = NO 12 | GENERATE_XML = YES 13 | 14 | WARN_IF_UNDOCUMENTED = NO 15 | -------------------------------------------------------------------------------- /examples/specific/name.h: -------------------------------------------------------------------------------- 1 | 2 | /*! \brief A failing class 3 | * \class Failing */ 4 | class Failing { 5 | public: 6 | /** 7 | * @name Some section . 8 | * THIS IS CAUSING THE ERROR, must have an empty star line above 9 | * 10 | * @{ 11 | */ 12 | int getSomething() const; ///< some docs 13 | bool isSomething() const; ///< some more docs 14 | //@} 15 | }; 16 | 17 | -------------------------------------------------------------------------------- /examples/specific/c_typedef.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample typedef for a function pointer 3 | */ 4 | typedef int (*cTypeDefTestFuncPtr)(void); 5 | 6 | typedef void* (*cVoidFuncPtr)(float, int); 7 | 8 | typedef void* cVoidPointer; 9 | 10 | typedef float* cFloatPointer; 11 | 12 | typedef float cFloatingPointNumber; 13 | 14 | /** 15 | * @brief Test for a simple C typedef 16 | */ 17 | typedef int cTestTypedef; 18 | -------------------------------------------------------------------------------- /examples/specific/qtsignalsandslots.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Qt Signals & Slots" 2 | OUTPUT_DIRECTORY = qtsignalsandslots 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = qtsignalsandslots.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/specific/struct_function.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Struct Function Command" 2 | OUTPUT_DIRECTORY = struct_function 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = struct_function.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/specific/fixedwidthfont.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Fixed width font markup doc test" 2 | OUTPUT_DIRECTORY = fixedwidthfont 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = fixedwidthfont.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/specific/cpp_inherited_members.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C++ Inherited Members" 2 | OUTPUT_DIRECTORY = cpp_inherited_members 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = cpp_inherited_members.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | INLINE_INHERITED_MEMB = YES 13 | -------------------------------------------------------------------------------- /examples/specific/parameters.cfg: -------------------------------------------------------------------------------- 1 | # For a case where Breathe was failing on the doxygen output 2 | 3 | PROJECT_NAME = "Parameters Test" 4 | OUTPUT_DIRECTORY = parameters 5 | GENERATE_LATEX = NO 6 | GENERATE_MAN = NO 7 | GENERATE_RTF = NO 8 | CASE_SENSE_NAMES = NO 9 | INPUT = parameters.h 10 | QUIET = YES 11 | JAVADOC_AUTOBRIEF = YES 12 | GENERATE_HTML = NO 13 | GENERATE_XML = YES 14 | -------------------------------------------------------------------------------- /tests/data/examples/test_membergroups/membergroups.h: -------------------------------------------------------------------------------- 1 | //! \brief demonstrates member groups 2 | class GroupedMembers { 3 | 4 | public: 5 | 6 | ///@{ @name myGroup 7 | void in_mygroup_one(int myParameter); ///< A function 8 | void in_mygroup_two(int myParameter); ///< Another function 9 | ///@} 10 | 11 | void not_in_mygroup(int myParameter); ///< This one is not in myGroup 12 | 13 | }; 14 | -------------------------------------------------------------------------------- /examples/specific/userdefined.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "User Defined Example" 2 | OUTPUT_DIRECTORY = userdefined 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = userdefined.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | DISTRIBUTE_GROUP_DOC = YES 13 | 14 | WARN_IF_UNDOCUMENTED = NO 15 | -------------------------------------------------------------------------------- /examples/specific/xrefsect.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Doxygen xrefsect" 2 | OUTPUT_DIRECTORY = xrefsect 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = xrefsect.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | ALIASES = "xrefsample=\xrefitem xrefsample \"xref Sample\" \"xref Sample\" " 13 | -------------------------------------------------------------------------------- /tests/data/examples/test_inheritance/inheritance.h: -------------------------------------------------------------------------------- 1 | 2 | class BaseA {}; 3 | class BaseB {}; 4 | 5 | /*! \brief This is the main class we're interested in */ 6 | class Main : public BaseA, BaseB {}; 7 | 8 | class ChildA : public Main {}; 9 | class ChildB : public Main {}; 10 | 11 | class ChildV1 : virtual public BaseA {}; 12 | class ChildV2 : virtual public BaseA {}; 13 | class ChildV3 : public ChildV1, ChildV2 {}; 14 | -------------------------------------------------------------------------------- /documentation/environment.yaml: -------------------------------------------------------------------------------- 1 | name: RTD 2 | channels: 3 | - conda-forge 4 | - defaults 5 | dependencies: 6 | # doxygen versions available from conda forge are listed at 7 | # https://anaconda.org/conda-forge/doxygen/files 8 | # 9 | # - doxygen=1.9.4 # to specify a specific version of doxygen 10 | # we'll be using the latest available 11 | - doxygen 12 | - pip 13 | - pip: 14 | - ".[docs,lint,test]" 15 | -------------------------------------------------------------------------------- /examples/doxygen/example.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Example Command" 2 | OUTPUT_DIRECTORY = example 3 | GENERATE_TAGFILE = example.tag 4 | GENERATE_LATEX = NO 5 | GENERATE_MAN = NO 6 | GENERATE_RTF = NO 7 | CASE_SENSE_NAMES = NO 8 | INPUT = example.cpp 9 | EXAMPLE_PATH = example_test.cpp 10 | QUIET = YES 11 | JAVADOC_AUTOBRIEF = YES 12 | GENERATE_HTML = NO 13 | GENERATE_XML = YES 14 | -------------------------------------------------------------------------------- /examples/specific/programlisting.h: -------------------------------------------------------------------------------- 1 | 2 | /*! Vector class */ 3 | class Vector {}; 4 | 5 | /*! 6 | * The center of the InteractionBox in device coordinates (millimeters). This point 7 | * is equidistant from all sides of the box. 8 | * 9 | * \include programlistinginclude.txt 10 | * 11 | * @returns The InteractionBox center in device coordinates. 12 | * @since 1.0 13 | */ 14 | LEAP_EXPORT Vector center() const; 15 | 16 | -------------------------------------------------------------------------------- /examples/doxygen/memgrp.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Member Grouping" 2 | OUTPUT_DIRECTORY = memgrp 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = memgrp.cpp 8 | QUIET = YES 9 | DISTRIBUTE_GROUP_DOC = YES 10 | JAVADOC_AUTOBRIEF = YES 11 | GENERATE_HTML = NO 12 | GENERATE_XML = YES 13 | 14 | WARN_IF_UNDOCUMENTED = NO -------------------------------------------------------------------------------- /tests/warnings/source/class.rst: -------------------------------------------------------------------------------- 1 | 2 | Class Warnings 3 | ============== 4 | 5 | Test 'cannot find project' warning. 6 | 7 | .. doxygenclass:: MyClass 8 | :project: nonexistent 9 | 10 | 11 | Test 'cannot find xml' warning: 12 | 13 | .. doxygenclass:: MyClass 14 | :project: invalidproject 15 | 16 | 17 | Test 'cannot find class' warning: 18 | 19 | .. doxygenclass:: NonExistentClass 20 | :project: class 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/specific/group.cfg: -------------------------------------------------------------------------------- 1 | # For a case where Breathe was failing on the doxygen output 2 | 3 | PROJECT_NAME = "Group Test" 4 | OUTPUT_DIRECTORY = group 5 | GENERATE_LATEX = NO 6 | GENERATE_MAN = NO 7 | GENERATE_RTF = NO 8 | CASE_SENSE_NAMES = NO 9 | INPUT = group.h 10 | QUIET = YES 11 | JAVADOC_AUTOBRIEF = YES 12 | GENERATE_HTML = NO 13 | GENERATE_XML = YES 14 | 15 | WARN_IF_UNDOCUMENTED = NO 16 | -------------------------------------------------------------------------------- /examples/doxygen/par.cpp: -------------------------------------------------------------------------------- 1 | /*! \class Test11 2 | * Normal text. 3 | * 4 | * \par User defined paragraph: 5 | * Contents of the paragraph. 6 | * 7 | * \par 8 | * New paragraph under the same heading. 9 | * 10 | * \note 11 | * This note consists of two paragraphs. 12 | * This is the first paragraph. 13 | * 14 | * \par 15 | * And this is the second paragraph. 16 | * 17 | * More normal text. 18 | */ 19 | 20 | class Test11 {}; 21 | -------------------------------------------------------------------------------- /examples/specific/dot_graphs.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Dot Graphs" 2 | HAVE_DOT = YES 3 | OUTPUT_DIRECTORY = dot_graphs 4 | DOTFILE_DIRS = . 5 | GENERATE_LATEX = NO 6 | GENERATE_RTF = NO 7 | GENERATE_MAN = NO 8 | CASE_SENSE_NAMES = NO 9 | INPUT = dot_graphs.h 10 | QUIET = YES 11 | JAVADOC_AUTOBRIEF = YES 12 | GENERATE_HTML = NO 13 | GENERATE_XML = YES 14 | WARNINGS = NO 15 | -------------------------------------------------------------------------------- /tests/warnings/source/group.rst: -------------------------------------------------------------------------------- 1 | 2 | Function Warnings 3 | ================= 4 | 5 | Test 'cannot find project' warning. 6 | 7 | .. doxygengroup:: MyFunction 8 | :project: nonexistent 9 | 10 | 11 | Test 'cannot find xml' warning: 12 | 13 | .. doxygengroup:: MyGroup 14 | :project: invalidproject 15 | 16 | 17 | Test 'cannot find function' warning. 18 | 19 | .. doxygengroup:: NonExistentGroup 20 | :project: group 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/specific/using_in_ns.h: -------------------------------------------------------------------------------- 1 | // 2 | // When declaring a type using a "using" directive inside a namespace, 3 | // Doxygen adds a spurious "typedef" in the corresponding XML definition 4 | // 5 | // $ doxygen --version 6 | // 1.8.11 7 | // 8 | 9 | namespace foo { 10 | using foo_int = int; // using foo::foo_int = typedef int 11 | } 12 | 13 | using global_int = int; // using global_int = int 14 | -------------------------------------------------------------------------------- /examples/doxygen/example.cpp: -------------------------------------------------------------------------------- 1 | /** A Test5 class. 2 | * More details about this class. 3 | */ 4 | 5 | class Test5 6 | { 7 | public: 8 | /** An example member function. 9 | * More details about this function. 10 | */ 11 | void example(); 12 | }; 13 | 14 | void Test5::example() {} 15 | 16 | /** \example example_test.cpp 17 | * This is an example of how to use the Test5 class. 18 | * More details about this example. 19 | */ 20 | -------------------------------------------------------------------------------- /examples/doxygen/page.doc: -------------------------------------------------------------------------------- 1 | /*! \page page1 A documentation page 2 | Leading text. 3 | \section sec An example section 4 | This page contains the subsections \ref subsection1 and \ref subsection2. 5 | For more info see page \ref page2. 6 | \subsection subsection1 The first subsection 7 | Text. 8 | \subsection subsection2 The second subsection 9 | More text. 10 | */ 11 | 12 | /*! \page page2 Another page 13 | Even more info. 14 | */ 15 | -------------------------------------------------------------------------------- /examples/specific/rst.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Rst Test" 2 | OUTPUT_DIRECTORY = rst 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = rst.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | ALIASES = "rst=\verbatim embed:rst" 14 | ALIASES += "endrst=\endverbatim" 15 | ALIASES += "inlinerst=\verbatim embed:rst:inline" 16 | -------------------------------------------------------------------------------- /examples/doxygen/afterdoc.h: -------------------------------------------------------------------------------- 1 | /*! A test class */ 2 | 3 | class Test1 4 | { 5 | public: 6 | /** An enum type. 7 | * The documentation block cannot be put after the enum! 8 | */ 9 | enum EnumType 10 | { 11 | int EVal1, /**< enum value 1 */ 12 | int EVal2 /**< enum value 2 */ 13 | }; 14 | void member(); //!< a member function. 15 | 16 | protected: 17 | int value; /*!< an integer value */ 18 | }; 19 | -------------------------------------------------------------------------------- /examples/doxygen/diagrams.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Diagrams" 2 | OUTPUT_DIRECTORY = diagrams 3 | HAVE_DOT = YES 4 | EXTRACT_ALL = YES 5 | GENERATE_LATEX = NO 6 | GENERATE_MAN = NO 7 | GENERATE_RTF = NO 8 | CASE_SENSE_NAMES = NO 9 | ENABLE_PREPROCESSING = YES 10 | INPUT = . 11 | FILE_PATTERNS = diagrams_*.h 12 | QUIET = YES 13 | JAVADOC_AUTOBRIEF = YES 14 | GENERATE_HTML = NO 15 | GENERATE_XML = YES 16 | -------------------------------------------------------------------------------- /examples/specific/cpp_function.h: -------------------------------------------------------------------------------- 1 | struct Foo{}; 2 | struct Class { 3 | virtual void f1() const volatile & = 0; 4 | virtual void f2() const volatile && = 0; 5 | static void f3(); 6 | 7 | 8 | void (*f_issue_489)(struct Foo *foo, int value); 9 | 10 | int f_issue_338() noexcept; 11 | }; 12 | 13 | /** A namespace to demonstrate a namespaced function */ 14 | namespace TestNamespaceFunction { 15 | /** A function within a namespace. */ 16 | void namespaceFunc(); 17 | } 18 | -------------------------------------------------------------------------------- /examples/specific/cpp_ns_template_specialization.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "C++ Template Specialization with Namespace" 2 | OUTPUT_DIRECTORY = cpp_ns_template_specialization 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = cpp_ns_template_specialization.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | WARN_IF_UNDOCUMENTED = NO 14 | -------------------------------------------------------------------------------- /examples/specific/decl_impl.h: -------------------------------------------------------------------------------- 1 | /*! \fn int open_di(const char *pathname,int flags) 2 | \brief Opens a file descriptor. 3 | 4 | Detailed description. 5 | 6 | \param pathname The name of the descriptor. 7 | \param flags Opening flags. 8 | */ 9 | int open_di(const char *,int); 10 | 11 | 12 | 13 | namespace testnamespace { 14 | 15 | /*! \brief Some documentation. 16 | 17 | More documentation. 18 | */ 19 | int another_open_di(const char *,int); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /examples/specific/inline.h: -------------------------------------------------------------------------------- 1 | #include 2 | /** A class to demonstrate inline documentation syntax. */ 3 | class InlineTest 4 | { 5 | public: 6 | /** A member function. 7 | * 8 | * Details about member function 9 | * 10 | * \exception std::out_of_range parameter is out of range. 11 | * @return a character pointer. 12 | */ 13 | const char *member(char c, ///< c a character. 14 | int n) ///< n an integer. 15 | 16 | throw(std::out_of_range); 17 | }; 18 | -------------------------------------------------------------------------------- /tests/data/examples/test_inline/inline.h: -------------------------------------------------------------------------------- 1 | #include 2 | /** A class to demonstrate inline documentation syntax. */ 3 | class InlineTest 4 | { 5 | public: 6 | /** A member function. 7 | * 8 | * Details about member function 9 | * 10 | * \exception std::out_of_range parameter is out of range. 11 | * @return a character pointer. 12 | */ 13 | const char *member(char c, ///< c a character. 14 | int n) ///< n an integer. 15 | 16 | throw(std::out_of_range); 17 | }; 18 | -------------------------------------------------------------------------------- /tests/data/examples/test_c_enum/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenenum:: GSM_BackupFormat 2 | .. doxygenenumvalue:: GSM_Backup_Auto 3 | .. doxygenenumvalue:: GSM_Backup_AutoUnicode 4 | .. doxygenenumvalue:: GSM_Backup_LMB 5 | .. doxygenenumvalue:: GSM_Backup_VCalendar 6 | .. doxygenenumvalue:: GSM_Backup_VCard 7 | .. doxygenenumvalue:: GSM_Backup_LDIF 8 | .. doxygenenumvalue:: GSM_Backup_ICS 9 | .. doxygenenumvalue:: GSM_Backup_Gammu 10 | .. doxygenenumvalue:: GSM_Backup_GammuUCS2 11 | .. doxygenenumvalue:: GSM_Backup_VNote 12 | -------------------------------------------------------------------------------- /examples/specific/simplesect.h: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | \pre stuff must be correct 4 | \pre more stuff must be correct 5 | \post stuff will be nice 6 | \post more stuff will be nice 7 | \return nothing 8 | \par par, something 9 | \warning warning, don't do this 10 | \note note, be careful 11 | \see see, f_raw 12 | \sa sa, f_raw 13 | \remark remark, 1 14 | \remark remark, 2 15 | \remarks remarks, 1 16 | \remarks remarks, 2 17 | */ 18 | template 19 | void f(int a, float b, std::string c); 20 | -------------------------------------------------------------------------------- /examples/doxygen/include.cpp: -------------------------------------------------------------------------------- 1 | 2 | /*! A test class. */ 3 | 4 | class Test7 5 | { 6 | public: 7 | /// a member function 8 | void example(); 9 | }; 10 | 11 | /*! \page example 12 | * \dontinclude example_test.cpp 13 | * Our main function starts like this: 14 | * \skip main 15 | * \until { 16 | * First we create a object \c t of the Test7 class. 17 | * \skipline Test7 18 | * Then we call the example member function 19 | * \line example 20 | * After that our little test routine ends. 21 | * \line } 22 | */ 23 | -------------------------------------------------------------------------------- /examples/tinyxml/tinyxml.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "TinyXML classes" 2 | OUTPUT_DIRECTORY = tinyxml 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = tinyxml.h 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | GENERATE_HTML = NO 11 | GENERATE_XML = YES 12 | 13 | # tinyxml.h is huge! Ignore any problems since the project is not maintained (moved to TinyXML-2 project). 14 | WARN_IF_UNDOCUMENTED = NO 15 | WARN_IF_INCOMPLETE_DOC = NO 16 | WARN_IF_DOC_ERROR = NO -------------------------------------------------------------------------------- /examples/specific/members.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | namespace testnamespace { 4 | 5 | //! \brief first class inside of namespace 6 | class NamespacedClassTest { 7 | 8 | public: 9 | 10 | //! \brief namespaced class function 11 | virtual void function() const = 0; 12 | 13 | explicit NamespacedClassTest() {}; 14 | 15 | protected: 16 | 17 | //! Some kind of function 18 | static void functionS(); 19 | 20 | private: 21 | 22 | 23 | //! \brief namespaced class other function 24 | void anotherFunction() {}; 25 | }; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /examples/specific/programlisting.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Program Listing Test" 2 | OUTPUT_DIRECTORY = programlisting 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = programlisting.h 8 | EXAMPLE_PATH = . 9 | QUIET = YES 10 | JAVADOC_AUTOBRIEF = YES 11 | GENERATE_HTML = NO 12 | GENERATE_XML = YES 13 | EXTRACT_ALL = YES 14 | 15 | ENABLE_PREPROCESSING = YES 16 | MACRO_EXPANSION = YES 17 | EXPAND_ONLY_PREDEF = YES 18 | PREDEFINED = LEAP_EXPORT="" 19 | 20 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_function/cpp_function.h: -------------------------------------------------------------------------------- 1 | struct Foo{}; 2 | struct Class { 3 | virtual void f1() const volatile & = 0; 4 | virtual void f2() const volatile && = 0; 5 | static void f3(); 6 | 7 | 8 | void (*f_issue_489)(struct Foo *foo, int value); 9 | 10 | int f_issue_338() noexcept; 11 | 12 | int anon_params(int, int, int x, char*); 13 | }; 14 | 15 | /** A namespace to demonstrate a namespaced function */ 16 | namespace TestNamespaceFunction { 17 | /** A function within a namspace. */ 18 | void namespaceFunc(); 19 | } 20 | -------------------------------------------------------------------------------- /tests/data/examples/test_simplesect/simplesect.h: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | \pre stuff must be correct 4 | \pre more stuff must be correct 5 | \post stuff will be nice 6 | \post more stuff will be nice 7 | \return nothing 8 | \par par, something 9 | \warning warning, don't do this 10 | \note note, be careful 11 | \see see, f_raw 12 | \sa sa, f_raw 13 | \remark remark, 1 14 | \remark remark, 2 15 | \remarks remarks, 1 16 | \remarks remarks, 2 17 | */ 18 | template 19 | void f(int a, float b, std::string c); 20 | -------------------------------------------------------------------------------- /documentation/source/code/nested_list_1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file nested_list_1.h 3 | * Example of nested lists in documentation. 4 | */ 5 | 6 | /** 7 | * A list of events: 8 | * - mouse events 9 | * -# mouse move event 10 | * -# mouse click event\n 11 | * More info about the click event. 12 | * -# mouse double click event 13 | * - keyboard events 14 | * 1. key down event 15 | * 2. key up event 16 | * 17 | * More text here. 18 | */ 19 | class NestedLists_1 20 | { 21 | }; 22 | 23 | -------------------------------------------------------------------------------- /tests/data/examples/doxyfile_template: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "example" 2 | HAVE_DOT = YES 3 | DOTFILE_DIRS = "." 4 | GENERATE_LATEX = NO 5 | GENERATE_MAN = NO 6 | GENERATE_RTF = NO 7 | CASE_SENSE_NAMES = NO 8 | OUTPUT_DIRECTORY = "{output}" 9 | IMAGE_PATH = "." 10 | QUIET = YES 11 | JAVADOC_AUTOBRIEF = YES 12 | GENERATE_HTML = NO 13 | GENERATE_XML = YES 14 | WARN_IF_UNDOCUMENTED = NO 15 | ALIASES = "rst=\verbatim embed:rst" 16 | ALIASES += "endrst=\endverbatim" 17 | ALIASES += "inlinerst=\verbatim embed:rst:inline" 18 | -------------------------------------------------------------------------------- /examples/doxygen/restypedef.cpp: -------------------------------------------------------------------------------- 1 | /*! \file restypedef.cpp 2 | * An example of resolving typedefs. 3 | */ 4 | 5 | /*! \struct CoordStruct 6 | * A coordinate pair. 7 | */ 8 | struct CoordStruct 9 | { 10 | /*! The x coordinate */ 11 | float x; 12 | /*! The y coordinate */ 13 | float y; 14 | }; 15 | 16 | /*! Creates a type name for CoordStruct */ 17 | typedef CoordStruct Coord; 18 | 19 | /*! 20 | * This function returns the addition of \a c1 and \a c2, i.e: 21 | * (c1.x+c2.x,c1.y+c2.y) 22 | */ 23 | Coord add(Coord c1,Coord c2) 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /tests/warnings/source/function.rst: -------------------------------------------------------------------------------- 1 | 2 | Function Warnings 3 | ================= 4 | 5 | Test 'cannot find project' warning. 6 | 7 | .. doxygenfunction:: MyFunction 8 | :project: nonexistent 9 | 10 | 11 | Test 'cannot find xml' warning: 12 | 13 | .. doxygenfunction:: MyFunction 14 | :project: invalidproject 15 | 16 | 17 | Test 'cannot find function' warning. 18 | 19 | .. doxygenfunction:: NonExistentFunction 20 | :project: function 21 | 22 | 23 | Test 'too many matches' warning. 24 | 25 | .. doxygenfunction:: f 26 | :project: function 27 | -------------------------------------------------------------------------------- /examples/specific/headerfile.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * \class ClassTest 4 | * \headerfile hearderfile.h "specific/headerfile.h" 5 | * \brief Class showing the header where it is defined 6 | */ 7 | class ClassTest 8 | { 9 | 10 | public: 11 | 12 | //! \brief Constructor 13 | ClassTest(); 14 | }; 15 | 16 | 17 | /** 18 | * \class ClassTest2 headerfile.h "specific/headerfile.h" 19 | * \brief Another way to show the header file 20 | */ 21 | class ClassTest2 22 | { 23 | 24 | public: 25 | 26 | //! \brief Constructor 27 | ClassTest2(); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /examples/doxygen/define.h: -------------------------------------------------------------------------------- 1 | /*! \file define.h 2 | \brief testing defines 3 | 4 | This is to test the documentation of defines. 5 | */ 6 | 7 | /*! 8 | \def MAX(x,y) 9 | Computes the maximum of \a x and \a y. 10 | */ 11 | 12 | /*! 13 | Computes the absolute value of its argument \a x. 14 | */ 15 | #define ABS(x) (((x)>0)?(x):-(x)) 16 | #define MAX(x,y) ((x)>(y)?(x):(y)) 17 | #define MIN(x,y) ((x)>(y)?(y):(x)) 18 | /*!< Computes the minimum of \a x and \a y. */ 19 | 20 | #define NOARGS (void*) 21 | /*!< Define with no arguments */ 22 | -------------------------------------------------------------------------------- /tests/data/multi_project/input.rst: -------------------------------------------------------------------------------- 1 | .. doxygenfunction:: fun1 2 | :project: A 3 | 4 | .. doxygenfunction:: fun1 5 | :project: B 6 | 7 | .. doxygenfunction:: fun1 8 | :path: {project_c_path} 9 | 10 | .. doxygenfunction:: fun2 11 | :project: A 12 | 13 | .. doxygenfunction:: fun2 14 | :project: B 15 | 16 | .. doxygenfunction:: fun2 17 | :path: {project_c_path} 18 | 19 | .. doxygenfunction:: funA 20 | :project: A 21 | 22 | .. doxygenfunction:: funB 23 | :project: B 24 | 25 | .. doxygenfunction:: funC 26 | :path: {project_c_path} 27 | 28 | -------------------------------------------------------------------------------- /examples/doxygen/author.cpp: -------------------------------------------------------------------------------- 1 | /*! \class WindowsNT 2 | * \brief Windows Nice Try. 3 | * \author Bill Gates 4 | * \author Several species of small furry animals gathered together 5 | * in a cave and grooving with a picture. 6 | * \version 4.0 7 | * \date 1996-1998 8 | * \bug It crashes a lot and requires huge amounts of memory. 9 | * \bug The class introduces the more bugs, the longer it is used. 10 | * \warning This class may explode in your face. 11 | * \warning If you inherit anything from this class, you're doomed. 12 | */ 13 | 14 | class WindowsNT {}; 15 | -------------------------------------------------------------------------------- /tests/warnings/source/conf.py: -------------------------------------------------------------------------------- 1 | # mypy: ignore-errors 2 | from __future__ import annotations 3 | 4 | import sys 5 | 6 | sys.path.append("../../") 7 | 8 | extensions = ["breathe"] 9 | 10 | # Breathe configuration parameters 11 | breathe_projects = { 12 | "class": "../../../examples/doxygen/class/xml/", 13 | "function": "../../../examples/specific/functionOverload/xml/", 14 | "group": "../../../examples/specific/group/xml/", 15 | "invalidproject": "invalid/path/", 16 | } 17 | 18 | master_doc = "index" 19 | project = "Test Breathe Warnings" 20 | html_theme = "default" 21 | -------------------------------------------------------------------------------- /examples/doxygen/docstring.py: -------------------------------------------------------------------------------- 1 | """@package docstring 2 | Documentation for this module. 3 | 4 | More details. 5 | """ 6 | 7 | from __future__ import annotations 8 | 9 | 10 | def func(): 11 | """Documentation for a function. 12 | 13 | More details. 14 | """ 15 | pass 16 | 17 | 18 | class PyClass: 19 | """Documentation for a class. 20 | 21 | More details. 22 | """ 23 | 24 | def __init__(self): 25 | """The constructor.""" 26 | self._memVar = 0 27 | 28 | def PyMethod(self): 29 | """Documentation for a method.""" 30 | pass 31 | -------------------------------------------------------------------------------- /examples/doxygen/manual.cfg: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = "Manual inheritance and membership" 2 | OUTPUT_DIRECTORY = manual 3 | GENERATE_LATEX = NO 4 | GENERATE_MAN = NO 5 | GENERATE_RTF = NO 6 | CASE_SENSE_NAMES = NO 7 | INPUT = manual.c 8 | QUIET = YES 9 | JAVADOC_AUTOBRIEF = YES 10 | EXTRACT_PRIVATE = YES 11 | EXTRACT_STATIC = YES 12 | TYPEDEF_HIDES_STRUCT = YES 13 | INLINE_SOURCES = YES 14 | REFERENCED_BY_RELATION = YES 15 | REFERENCES_RELATION = YES 16 | GENERATE_HTML = NO 17 | GENERATE_XML = YES 18 | -------------------------------------------------------------------------------- /examples/specific/template_specialisation.h: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | A generic template class. 4 | */ 5 | template 6 | class TemplateClass 7 | { 8 | }; 9 | 10 | /*! 11 | A partial specialization of TemplateClass for pointer types. 12 | */ 13 | template 14 | class TemplateClass 15 | { 16 | }; 17 | 18 | /*! 19 | A generic template class. 20 | */ 21 | template 22 | class SecondTemplateClass 23 | { 24 | }; 25 | 26 | /*! 27 | A partial specialization of SecondTemplateClass for pointer types. 28 | */ 29 | template 30 | class SecondTemplateClass 31 | { 32 | }; 33 | -------------------------------------------------------------------------------- /examples/specific/template_type_alias.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief a type alias with one template argument 3 | * 4 | * @tparam T this is the template parameter 5 | * 6 | */ 7 | template 8 | using IsFuzzy = std::is_fuzzy; 9 | 10 | 11 | /** 12 | * @brief a type alias with three template arguments 13 | * 14 | * @tparam T this is the first template parameter 15 | * @tparam U this is the second template parameter 16 | * @tparam N this is the third template parameter, it is a non-type parameter 17 | * 18 | */ 19 | template 20 | using IsFurry = std::is_furry; 21 | -------------------------------------------------------------------------------- /documentation/source/code/nested_list_3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file nested_list_3.h 3 | * Example of nested lists in documentation. 4 | */ 5 | 6 | /*! 7 | * A list of events: 8 | *
    9 | *
  • mouse events 10 | *
      11 | *
    1. mouse move event 12 | *
    2. mouse click event
      13 | * More info about the click event. 14 | *
    3. mouse double click event 15 | *
    16 | *
  • keyboard events 17 | *
      18 | *
    1. key down event 19 | *
    2. key up event 20 | *
    21 | *
22 | * More text here. 23 | */ 24 | class NestedLists_3 25 | { 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /examples/doxygen/overload.cpp: -------------------------------------------------------------------------------- 1 | class Test10 2 | { 3 | public: 4 | void drawRect(int,int,int,int); 5 | void drawRect(const Rect &r); 6 | }; 7 | 8 | void Test10::drawRect(int x,int y,int w,int h) {} 9 | void Test10::drawRect(const Rect &r) {} 10 | 11 | /*! \class Test10 12 | * \brief A short description. 13 | * 14 | * More text. 15 | */ 16 | 17 | /*! \fn void Test10::drawRect(int x,int y,int w,int h) 18 | * This command draws a rectangle with a left upper corner at ( \a x , \a y ), 19 | * width \a w and height \a h. 20 | */ 21 | 22 | /*! 23 | * \overload void Test10::drawRect(const Rect &r) 24 | */ 25 | 26 | -------------------------------------------------------------------------------- /examples/doxygen/parblock.cpp: -------------------------------------------------------------------------------- 1 | /*! \class Test15 2 | * Normal text. 3 | * 4 | * \par A paragraph followed by a paragraph block: 5 | * \parblock 6 | * Contents of the first paragraph in the block. 7 | * 8 | * New paragraph under the same heading. 9 | * \endparblock 10 | * 11 | * \note 12 | * This note consists of three paragraphs in a block. 13 | * \parblock 14 | * This is the first paragraph in the block. 15 | * 16 | * And this is the second paragraph in the block. 17 | * 18 | * And still a third paragraph in the block. 19 | * \endparblock 20 | * 21 | * More normal text. 22 | */ 23 | 24 | class Test15 {}; 25 | -------------------------------------------------------------------------------- /tests/data/examples/test_template_type_alias/template_type_alias.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief a type alias with one template argument 3 | * 4 | * @tparam T this is the template parameter 5 | * 6 | */ 7 | template 8 | using IsFuzzy = std::is_fuzzy; 9 | 10 | 11 | /** 12 | * @brief a type alias with three template arguments 13 | * 14 | * @tparam T this is the first template parameter 15 | * @tparam U this is the second template parameter 16 | * @tparam N this is the third template parameter, it is a non-type parameter 17 | * 18 | */ 19 | template 20 | using IsFurry = std::is_furry; 21 | -------------------------------------------------------------------------------- /documentation/source/autoindex.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _autodoxygenindex-example: 3 | 4 | autodoxygenindex Directive Example 5 | ================================== 6 | 7 | Working Example 8 | --------------- 9 | 10 | This should work: 11 | 12 | .. code-block:: rst 13 | 14 | .. autodoxygenindex:: 15 | :project: auto 16 | 17 | With the following config value: 18 | 19 | .. code-block:: python 20 | 21 | breathe_projects_source = { 22 | "auto" : ( "../examples/specific", ["auto_function.h", "auto_class.h"] ) 23 | } 24 | 25 | It produces this output: 26 | 27 | .. cpp:namespace:: @ex_autoindex 28 | 29 | .. autodoxygenindex:: 30 | :project: auto 31 | -------------------------------------------------------------------------------- /breathe/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from typing import TYPE_CHECKING 4 | 5 | if TYPE_CHECKING: 6 | from sphinx.application import Sphinx 7 | 8 | __version__ = "5.0.0a5" 9 | 10 | 11 | def setup(app: Sphinx): 12 | from breathe.directives.setup import setup as directive_setup 13 | from breathe.file_state_cache import setup as file_state_cache_setup 14 | from breathe.renderer.sphinxrenderer import setup as renderer_setup 15 | 16 | directive_setup(app) 17 | file_state_cache_setup(app) 18 | renderer_setup(app) 19 | 20 | return {"version": __version__, "parallel_read_safe": True, "parallel_write_safe": True} 21 | -------------------------------------------------------------------------------- /examples/specific/typedef.h: -------------------------------------------------------------------------------- 1 | 2 | class TypeDefTest { 3 | }; 4 | 5 | /* A dummy typedef */ 6 | typedef TypeDefTest (*TypeDefTestFuncPtr)(void); 7 | 8 | typedef void* (*voidFuncPtr)(float, int); 9 | 10 | typedef void* voidPointer; 11 | 12 | typedef float* floatPointer; 13 | 14 | typedef float floatingPointNumber; 15 | 16 | typedef int TestTypedef; 17 | 18 | namespace TypeDefNamespace { 19 | typedef char *AnotherTypedef; 20 | } 21 | 22 | class TestClass { 23 | public: 24 | /** A typedef defined in a class. */ 25 | typedef void *MemberTypedef; 26 | 27 | typedef void (*MemberTypedefFuncPointer)(int, double); 28 | }; 29 | 30 | using TypeAlias = int; 31 | -------------------------------------------------------------------------------- /examples/specific/define.h: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple define without a value 3 | */ 4 | #define USE_STUFF 5 | 6 | 7 | /** 8 | * A define with a simple value 9 | */ 10 | #define MAX_LENGTH 100 11 | 12 | 13 | /** 14 | * A define with some parameters 15 | * 16 | * \param A The parameter A 17 | * \param B The parameter B 18 | * 19 | * \returns The maximum of A and B 20 | */ 21 | #define MAXIMUM(A,B) ((A > B)?(A):(B)) 22 | 23 | 24 | /** 25 | * A define which spans multiple lines 26 | */ 27 | #define SWAP(A,B) { \ 28 | (a) ^= (b); \ 29 | (b) ^= (a); \ 30 | (a) ^= (b); \ 31 | } 32 | -------------------------------------------------------------------------------- /tests/data/examples/test_define/define.h: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple define without a value 3 | */ 4 | #define USE_STUFF 5 | 6 | 7 | /** 8 | * A define with a simple value 9 | */ 10 | #define MAX_LENGTH 100 11 | 12 | 13 | /** 14 | * A define with some parameters 15 | * 16 | * \param A The parameter A 17 | * \param B The parameter B 18 | * 19 | * \returns The maximum of A and B 20 | */ 21 | #define MAXIMUM(A,B) ((A > B)?(A):(B)) 22 | 23 | 24 | /** 25 | * A define which spans multiple lines 26 | */ 27 | #define SWAP(A,B) { \ 28 | (a) ^= (b); \ 29 | (b) ^= (a); \ 30 | (a) ^= (b); \ 31 | } 32 | -------------------------------------------------------------------------------- /examples/specific/cpp_function_lookup.h: -------------------------------------------------------------------------------- 1 | // stuff on the paramQual 2 | void fNoexcept() noexcept; 3 | void fFinal() final; 4 | void fOverride() override; 5 | void fAttr() [[myattr]]; // TODO: Doxygen seems to strip attributes 6 | void fFInit() = default; 7 | auto fTrailing() -> int; 8 | 9 | // different parameters 10 | void fInit(int arg = 42); 11 | void fPlain(int arg); 12 | void fPtr(int *arg); 13 | void fLRef(int &arg); 14 | void fRRef(int &&arg); 15 | template 16 | void fParamPack(T ...arg); 17 | class A {}; 18 | void fMemPtr(int A::*arg); 19 | void fParen(void (*arg)()); 20 | 21 | // different parameters in a function pointer 22 | void fParenPlain(void (*arg)(int argInner)); 23 | -------------------------------------------------------------------------------- /examples/tinyxml/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This file was generated from Makefile.in on Sat Dec 13 12:17:28 GMT 2008 3 | # 4 | 5 | DOXYGEN ?= `which doxygen` 6 | TMAKEPATH = 7 | ENV = env TMAKEPATH=$(TMAKEPATH) 8 | TMAKE = 9 | MAKE = /usr/bin/make 10 | PERL = /usr/bin/perl 11 | RM = rm -f 12 | CP = cp 13 | VERSION = 1.5.7.1 14 | INSTALL = /tmp 15 | INSTTOOL = /usr/bin/install 16 | DOXYDOCS = .. 17 | DOCDIR = $(INSTALL)/share/doc/packages/doxygen 18 | QTDIR = 19 | HAVE_DOT = /usr/bin/dot 20 | 21 | all: tinyxml/xml/index.xml 22 | 23 | clean: 24 | rm -rf tinyxml 25 | 26 | tinyxml/xml/index.xml: tinyxml.h tinyxml.cfg 27 | $(DOXYGEN) tinyxml.cfg 28 | 29 | -------------------------------------------------------------------------------- /examples/specific/dot_graphs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file dot_graphs.h 3 | * 4 | * @page dotgraphs Dot Graph Demonstrations 5 | * 6 | * @section dotcmd Using \@dot command 7 | * 8 | * @dot "basic graph elements" 9 | * digraph G { 10 | * bgcolor="purple:pink" label="a graph" fontcolor="white" 11 | * subgraph cluster1 { 12 | * fillcolor="blue:cyan" label="a cluster" fontcolor="white" style="filled" gradientangle="270" 13 | * node [shape=box fillcolor="red:yellow" style="filled" gradientangle=90] 14 | * "a node"; 15 | * } 16 | * } 17 | * @enddot 18 | * 19 | * @section dotfilecmd Using \@dotfile command 20 | * 21 | * @dotfile "dotfile.dot" "Captions go here" 22 | */ 23 | -------------------------------------------------------------------------------- /documentation/source/inline.rst: -------------------------------------------------------------------------------- 1 | 2 | Inline Parameter Documentation 3 | ============================== 4 | 5 | This is currently flawed as it doesn't know where to sensibly put the parameters 6 | in the final description. 7 | 8 | It currently defaults to the top of the detail description block which means it 9 | comes between the brief description text and the detailed description text which 10 | is less than ideal, but attempts to programmatically figure out where the detail 11 | description text ends have failed. Something for future work. 12 | 13 | Example 14 | ------- 15 | 16 | .. cpp:namespace:: @ex_inline 17 | 18 | .. doxygenindex:: 19 | :path: ../../examples/specific/inline/xml 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/doxygen/pyexample.py: -------------------------------------------------------------------------------- 1 | ## @package pyexample 2 | # Documentation for this module. 3 | # 4 | # More details. 5 | 6 | 7 | ## Documentation for a function. 8 | # 9 | # More details. 10 | from __future__ import annotations 11 | 12 | 13 | def func(): 14 | pass 15 | 16 | 17 | ## Documentation for a class. 18 | # 19 | # More details. 20 | class PyClass: 21 | ## The constructor. 22 | def __init__(self): 23 | self._memVar = 0 24 | 25 | ## Documentation for a method. 26 | # @param self The object pointer. 27 | def PyMethod(self): 28 | pass 29 | 30 | ## A class variable. 31 | classVar = 0 32 | 33 | ## @var _memVar 34 | # a member variable 35 | -------------------------------------------------------------------------------- /tests/data/examples/test_headings/headings.h: -------------------------------------------------------------------------------- 1 | /*! \brief This is a documentation 2 | 3 | This is more documentation. 4 | 5 |

Header

6 | Text 7 | 8 |

Header Bold Header Text

9 | Text 10 | 11 | Header 12 | --------- 13 | Text 14 | 15 | ### Header ### 16 | Text 17 | */ 18 | class HeadingsTest1 {}; 19 | 20 | /*! 21 | # Header 1 22 | 23 | Blah 24 | 25 | ## Header 2 26 | 27 | Blah blah 28 | 29 | ### Header 3 30 | 31 | Blah blah blah 32 | */ 33 | class HeadingsTest2 {}; 34 | 35 | /*! 36 | ### Header3 ### 37 | Text 38 | */ 39 | class HeadingsTest3 {}; 40 | 41 | /*! 42 | # Header 1 43 | 44 | Text 45 | 46 | ### Header 3 47 | 48 | Text text text 49 | */ 50 | class HeadingsTest4 {}; 51 | -------------------------------------------------------------------------------- /examples/doxygen/enum.h: -------------------------------------------------------------------------------- 1 | class Test4 2 | { 3 | public: 4 | enum TEnum { Val1, Val2 }; 5 | 6 | /*! Another enum, with inline docs */ 7 | enum AnotherEnum 8 | { 9 | V1, /*!< value 1 */ 10 | V2 /*!< value 2 */ 11 | }; 12 | 13 | /*! Another enum, with inline docs (using an explicit datatype) */ 14 | enum class AnotherScopedEnum : long 15 | { 16 | V1, /*!< value 1 */ 17 | V2 /*!< value 2 */ 18 | }; 19 | }; 20 | 21 | /*! \class Test4 22 | * The class description. 23 | */ 24 | 25 | /*! \enum Test4::TEnum 26 | * A description of the enum type. 27 | */ 28 | 29 | /*! \var Test4::TEnum Test4::Val1 30 | * The description of the first enum value. 31 | */ 32 | -------------------------------------------------------------------------------- /tests/data/examples/test_dot_graphs/dot_graphs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file dot_graphs.h 3 | * 4 | * @page dotgraphs Dot Graph Demonstrations 5 | * 6 | * @section dotcmd Using \@dot command 7 | * 8 | * @dot "basic graph elements" 9 | * digraph G { 10 | * bgcolor="purple:pink" label="a graph" fontcolor="white" 11 | * subgraph cluster1 { 12 | * fillcolor="blue:cyan" label="a cluster" fontcolor="white" style="filled" gradientangle="270" 13 | * node [shape=box fillcolor="red:yellow" style="filled" gradientangle=90] 14 | * "a node"; 15 | * } 16 | * } 17 | * @enddot 18 | * 19 | * @section dotfilecmd Using \@dotfile command 20 | * 21 | * @dotfile "dotfile.dot" "Captions go here" 22 | */ 23 | -------------------------------------------------------------------------------- /documentation/source/code/nested_list_2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file nested_list_2.h 3 | * Example of nested list in documentation. 4 | */ 5 | 6 | /** 7 | * Text before the list 8 | * - list item 1 9 | * - sub item 1 10 | * - sub sub item 1 11 | * - sub sub item 2 12 | * . 13 | * The dot above ends the sub sub item list. 14 | * 15 | * More text for the first sub item 16 | * . 17 | * The dot above ends the first sub item. 18 | * 19 | * More text for the first list item 20 | * - sub item 2 21 | * - sub item 3 22 | * - list item 2 23 | * . 24 | * More text in the same paragraph. 25 | * 26 | * More text in a new paragraph. 27 | */ 28 | class NestedLists_2 29 | { 30 | }; 31 | 32 | -------------------------------------------------------------------------------- /documentation/source/code/nested_list_4.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file nested_list_4.h 3 | * Example of nested lists in documentation. 4 | */ 5 | 6 | /** 7 | * A list of events: 8 | * 1. mouse events 9 | * -# mouse move event 10 | * 1. swipe event 11 | * 2. circle event 12 | * 3. wave event 13 | * -# mouse click event\n 14 | * More info about the click event. 15 | * -# mouse double click event 16 | * 2. keyboard events 17 | * -# key down event 18 | * -# key up event 19 | * 3. touch events 20 | * -# pinch event 21 | * -# swipe event 22 | * More text here. 23 | */ 24 | class NestedLists_4 25 | { 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | 2 | Contributing 3 | ============ 4 | 5 | Firstly, thank you for making it this far. We really appreciate anyone who even 6 | thinks about reporting an issue or helping out with the code or docs. It is kind 7 | of you to take the time. 8 | 9 | Please Provide an Example 10 | ------------------------- 11 | 12 | If you're having trouble with how the contents of a particular Doxygen comment 13 | or a particular set of code is being processed then please provide an example of 14 | the in question. 15 | 16 | Ideally as a pull-request with additions to the `examples/specific` folder but 17 | feel free to provide the comment content in your issue instead. 18 | 19 | It really helps to accelerate development if we have examples to work from. 20 | -------------------------------------------------------------------------------- /documentation/source/autofile.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _autodoxygenfile-example: 3 | 4 | autodoxygenfile Directive Example 5 | ================================= 6 | 7 | For more details and directive documentation please see :ref:`file-example`, 8 | which is very similar to this directive. 9 | 10 | Working Example 11 | --------------- 12 | 13 | This should work: 14 | 15 | .. code-block:: rst 16 | 17 | .. autodoxygenfile:: auto_class.h 18 | :project: auto 19 | 20 | With the following config value: 21 | 22 | .. code-block:: python 23 | 24 | breathe_projects_source = { 25 | "auto" : ( "../examples/specific", ["auto_class.h"] ) 26 | } 27 | 28 | It produces this output: 29 | 30 | .. autodoxygenfile:: auto_class.h 31 | :project: auto 32 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: breathe-doc 4 | patreon: # Replace with a single Patreon username 5 | open_collective: breathe 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /examples/specific/template_class.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief a class with a template parameter 3 | * 4 | * @tparam T this is the template parameter 5 | */ 6 | template 7 | class templateclass 8 | { 9 | public: 10 | 11 | /// default constructor 12 | templateclass() {} 13 | 14 | /** 15 | * @brief constructor with template argument 16 | * 17 | * @param m the argument 18 | */ 19 | templateclass(T const & m) : member(m) {} 20 | 21 | /** 22 | * @brief member accepting template argument and returning template argument 23 | * 24 | * @param t argument of type T 25 | * @return returns value of type T 26 | */ 27 | T method(T const & t); 28 | 29 | private: 30 | /// a member with templated type 31 | T member; 32 | }; 33 | -------------------------------------------------------------------------------- /documentation/source/spelling_wordlist.txt: -------------------------------------------------------------------------------- 1 | STL 2 | TVal 3 | autodoxygenindex 4 | cdata 5 | cfile 6 | config 7 | doxygen 8 | doxygenenum 9 | doxygenfunction 10 | doxygenstruct 11 | doxygentypedef 12 | doxygenfile 13 | doxygenunion 14 | doxygenvariable 15 | doxygengroup 16 | doxygendefine 17 | doxygenclass 18 | doxygenindex 19 | bitmasks 20 | madeupgroup 21 | enum 22 | foo 23 | foos 24 | frob 25 | frobs 26 | namespace 27 | namespaces 28 | namespaced 29 | reStructuredText 30 | tabsize 31 | tinyXml 32 | tinyxml 33 | tinyXML 34 | programmatically 35 | struct 36 | py 37 | conf 38 | inline 39 | License 40 | autodoc 41 | renderers 42 | github 43 | heesch 44 | brandl 45 | goodger 46 | wildcard 47 | wildcards 48 | xml 49 | Func 50 | Memgrp 51 | Docstring 52 | Autolink 53 | GVal 54 | attributeB 55 | -------------------------------------------------------------------------------- /documentation/source/customcss.rst: -------------------------------------------------------------------------------- 1 | 2 | .. highlight:: css 3 | 4 | Custom CSS 5 | ========== 6 | 7 | In order to help with the output styling in HTML, Breathe attaches some custom 8 | classes to parts of the document. There are three such classes: 9 | 10 | **breatheparameterlist** 11 | Used to keep the description of a parameter displayed inline with the 12 | parameter name. The Breathe docs use: 13 | 14 | .. code-block:: css 15 | 16 | .breatheparameterlist li tt + p { 17 | display: inline; 18 | } 19 | 20 | **breatheenumvalues** 21 | Used to keep the description of an enum displayed inline with the 22 | enum name. The Breathe docs use: 23 | 24 | .. code-block:: css 25 | 26 | .breatheenumvalues li tt + p { 27 | display: inline; 28 | } 29 | -------------------------------------------------------------------------------- /documentation/source/code/nested_list_5.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file nested_list_4.h 3 | * Example of nested lists in documentation. 4 | */ 5 | 6 | /** 7 | * A deeply nested list of events: 8 | * 1. mouse events 9 | * -# mouse move event 10 | * 1. swipe event 11 | * -# swipe left 12 | * -# swipe right 13 | * 2. circle event 14 | * 3. wave event 15 | * -# mouse click event\n 16 | * More info about the click event. 17 | * -# mouse double click event 18 | * 2. keyboard events 19 | * -# key down event 20 | * -# key up event 21 | * 3. touch events 22 | * -# pinch event 23 | * -# swipe event 24 | * More text here. 25 | */ 26 | class NestedLists_5 27 | { 28 | }; 29 | -------------------------------------------------------------------------------- /tests/data/ellipsis.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | double 7 | double amici::spline_pos 8 | (double t, int num,...) 9 | spline_pos 10 | 11 | double 12 | t 13 | 14 | 15 | int 16 | num 17 | 18 | 19 | ... 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/data/examples/test_group_content_only/compare.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | struct Structy 7 | 8 | Hello. 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/doxygen/func.h: -------------------------------------------------------------------------------- 1 | class Test6 2 | { 3 | public: 4 | const char *member(char,int) throw(std::out_of_range); 5 | }; 6 | 7 | const char *Test6::member(char c,int n) throw(std::out_of_range) {} 8 | 9 | /*! \class Test6 10 | * \brief Test6 class. 11 | * 12 | * Details about Test6. 13 | */ 14 | 15 | /*! \fn const char *Test6::member(char c,int n) 16 | * \brief A member function. 17 | * \param c a character. 18 | * \param n an integer. 19 | * \exception std::out_of_range parameter is out of range. 20 | * \return a character pointer. 21 | */ 22 | 23 | /*! \brief Doing important things with parameter directions 24 | * 25 | * \param[out] a output 26 | * \param[in] b input 27 | * \param[in, out] c input but gets rewritten 28 | */ 29 | void myFunc(int * a, int * b, int * c); 30 | -------------------------------------------------------------------------------- /examples/specific/union.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /// A union of two values 4 | union SeparateUnion 5 | { 6 | int size; ///< The size of the thing 7 | float depth; ///< How deep it is 8 | }; 9 | 10 | 11 | namespace foo { 12 | 13 | /// A union of two values 14 | union MyUnion 15 | { 16 | int someInt; ///< The int of it all 17 | float someFloat; ///< The float side of things 18 | }; 19 | 20 | } 21 | 22 | /// A class with a union 23 | class ClassWithUnion 24 | { 25 | /// A union with two values 26 | union UnionInClass 27 | { 28 | int intvalue; ///< An int value 29 | float floatvalue; ///< A float value 30 | }; 31 | 32 | /// Documented class 33 | class ExtraClass 34 | { 35 | int a_member; 36 | float another_member; 37 | }; 38 | }; 39 | -------------------------------------------------------------------------------- /tests/data/examples/test_union/union.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /// A union of two values 4 | union SeparateUnion 5 | { 6 | int size; ///< The size of the thing 7 | float depth; ///< How deep it is 8 | }; 9 | 10 | 11 | namespace foo { 12 | 13 | /// A union of two values 14 | union MyUnion 15 | { 16 | int someInt; ///< The int of it all 17 | float someFloat; ///< The float side of things 18 | }; 19 | 20 | } 21 | 22 | /// A class with a union 23 | class ClassWithUnion 24 | { 25 | /// A union with two values 26 | union UnionInClass 27 | { 28 | int intvalue; ///< An int value 29 | float floatvalue; ///< A float value 30 | }; 31 | 32 | /// Documented class 33 | class ExtraClass 34 | { 35 | int a_member; 36 | float another_member; 37 | }; 38 | }; 39 | -------------------------------------------------------------------------------- /breathe/path_handler.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from pathlib import Path 4 | from typing import TYPE_CHECKING 5 | 6 | if TYPE_CHECKING: 7 | from sphinx.application import Sphinx 8 | 9 | 10 | def includes_directory(file_path: str): 11 | # Check for backslash or forward slash as we don't know what platform we're on and sometimes 12 | # the doxygen paths will have forward slash even on Windows. 13 | return bool(str(file_path).count("\\")) or bool(str(file_path).count("/")) 14 | 15 | 16 | def resolve_path(app: Sphinx, directory: str, filename: str): 17 | """Returns a full path to the filename in the given directory assuming that if the directory 18 | path is relative, then it is relative to the conf.py directory. 19 | """ 20 | 21 | return Path(app.confdir, directory, filename).resolve() 22 | -------------------------------------------------------------------------------- /examples/specific/xrefsect.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file xrefsect.h 3 | * A few examples of xrefsect items support. 4 | */ 5 | 6 | /** 7 | * An example of using Doxygen's todo command. 8 | * 9 | * @todo Implement this function. 10 | */ 11 | int unimplemented(void); 12 | 13 | /** 14 | * An example of using Doxygen's bug and test commands. 15 | * 16 | * @bug Does not work yet. 17 | * 18 | * @test Add proper unit testing first. 19 | */ 20 | void buggy_function(int param); 21 | 22 | /** 23 | * An example of using Doxygen's deprecated command. 24 | * 25 | * @deprecated Should not be used on new code. 26 | */ 27 | void old_function(void); 28 | 29 | /** 30 | * An example of a custom Doxygen xrefitem declared as an ALIAS. 31 | * 32 | * @xrefsample This text shows up in the xref output. 33 | */ 34 | void sample_xrefitem_function(void); 35 | -------------------------------------------------------------------------------- /documentation/source/define.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _define-example: 3 | 4 | doxygendefine Directive Example 5 | =============================== 6 | 7 | Working Example 8 | --------------- 9 | 10 | This should work: 11 | 12 | .. code-block:: rst 13 | 14 | .. doxygendefine:: WRITE_TREE_MISSING_OK 15 | :project: c_file 16 | 17 | It produces this output: 18 | 19 | .. doxygendefine:: WRITE_TREE_MISSING_OK 20 | :project: c_file 21 | 22 | Failing Example 23 | --------------- 24 | 25 | This intentionally fails: 26 | 27 | .. code-block:: rst 28 | 29 | .. doxygendefine:: MADEUPDEFINE 30 | :project: define 31 | 32 | It produces the following warning message: 33 | 34 | .. warning:: 35 | doxygendefine: Cannot find define "MADEUPDEFINE" in doxygen xml 36 | output for project "define" in directory: ../../examples/specific/define/xml 37 | -------------------------------------------------------------------------------- /tests/data/examples/test_xrefsect/xrefsect.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file xrefsect.h 3 | * A few examples of xrefsect items support. 4 | */ 5 | 6 | /** 7 | * An example of using Doxygen's todo command. 8 | * 9 | * @todo Implement this function. 10 | */ 11 | int unimplemented(void); 12 | 13 | /** 14 | * An example of using Doxygen's bug and test commands. 15 | * 16 | * @bug Does not work yet. 17 | * 18 | * @test Add proper unit testing first. 19 | */ 20 | void buggy_function(int param); 21 | 22 | /** 23 | * An example of using Doxygen's deprecated command. 24 | * 25 | * @deprecated Should not be used on new code. 26 | */ 27 | void old_function(void); 28 | 29 | /** 30 | * An example of a custom Doxygen xrefitem declared as an ALIAS. 31 | * 32 | * @xrefsample This text shows up in the xref output. 33 | */ 34 | void sample_xrefitem_function(void); 35 | -------------------------------------------------------------------------------- /examples/doxygen/templ.cpp: -------------------------------------------------------------------------------- 1 | 2 | /*! A template class */ 3 | template class Test14 4 | { 5 | public: 6 | Test14(); 7 | Test14(const Test14 &); 8 | }; 9 | 10 | /*! complete specialization */ 11 | template<> class Test14 12 | { 13 | public: 14 | Test14(); 15 | }; 16 | 17 | /*! A partial template specialization */ 18 | template class Test14 : public Test14 19 | { 20 | public: 21 | Test14(); 22 | }; 23 | 24 | /*! The constructor of the template class*/ 25 | template Test14::Test14() {} 26 | 27 | /*! The copy constructor */ 28 | template Test14::Test14(const Test14 &t) {} 29 | 30 | /*! The constructor of the partial specialization */ 31 | template Test14::Test14() {} 32 | 33 | /*! The constructor of the specialization */ 34 | template<> Test14::Test14() {} 35 | 36 | -------------------------------------------------------------------------------- /documentation/source/code/groups.h: -------------------------------------------------------------------------------- 1 | // Example from Doxygen documentation 2 | 3 | /** A class. More details about the Test class */ 4 | class UserDefinedGroupTest 5 | { 6 | public: 7 | //@{ 8 | /** Same documentation for both members. Details */ 9 | void func1InGroup1(); 10 | void func2InGroup1(); 11 | //@} 12 | 13 | /** Function without group. Details. */ 14 | void ungroupedFunction(); 15 | void func1InCustomGroup(); 16 | protected: 17 | void func2InCustomGroup(); 18 | }; 19 | 20 | void UserDefinedGroupTest::func1InGroup1() {} 21 | void UserDefinedGroupTest::func2InGroup1() {} 22 | 23 | /** @name Custom Group 24 | * Description of custom group 25 | */ 26 | //@{ 27 | /** Function 2 in custom group. Details. */ 28 | void UserDefinedGroupTest::func2InCustomGroup() {} 29 | /** Function 1 in custom group. Details. */ 30 | void UserDefinedGroupTest::func1InCustomGroup() {} 31 | //@} 32 | -------------------------------------------------------------------------------- /documentation/source/concept.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _concept-example: 3 | 4 | doxygenconcept Directive Example 5 | ================================ 6 | 7 | .. warning:: 8 | C++20 Concepts support was added in Doxygen v1.9.2. Please be sure to use Doxygen v1.9.2 or 9 | newer with :ref:`doxygenconcept`. 10 | 11 | Working Example 12 | --------------- 13 | 14 | This should work: 15 | 16 | .. code-block:: rst 17 | 18 | .. doxygenconcept:: Hashable 19 | :project: cpp_concept 20 | 21 | It produces this output: 22 | 23 | .. doxygenconcept:: Hashable 24 | :project: cpp_concept 25 | 26 | Failing Example 27 | --------------- 28 | 29 | This intentionally fails: 30 | 31 | .. code-block:: rst 32 | 33 | .. doxygenconcept:: MadeUpConcept 34 | :project: cpp_concept 35 | 36 | It produces the following warning message: 37 | 38 | .. warning:: 39 | doxygenconcept: Cannot find concept "MadeUpConcept" in doxygen xml output 40 | -------------------------------------------------------------------------------- /examples/specific/userdefined.h: -------------------------------------------------------------------------------- 1 | // Example from Doxygen documentation 2 | 3 | /** A class. More details about the UserDefinedGroupTest class */ 4 | class UserDefinedGroupTest 5 | { 6 | public: 7 | //@{ 8 | /** Same documentation for both members. Details */ 9 | void func1InGroup1(); 10 | void func2InGroup1(); 11 | //@} 12 | 13 | /** Function without group. Details. */ 14 | void ungroupedFunction(); 15 | void func1InCustomGroup(); 16 | protected: 17 | void func2InCustomGroup(); 18 | }; 19 | 20 | void UserDefinedGroupTest::func1InGroup1() {} 21 | void UserDefinedGroupTest::func2InGroup1() {} 22 | 23 | /** @name Custom Group 24 | * Description of custom group 25 | */ 26 | //@{ 27 | /** Function 2 in custom group. Details. */ 28 | void UserDefinedGroupTest::func2InCustomGroup() {} 29 | /** Function 1 in custom group. Details. */ 30 | void UserDefinedGroupTest::func1InCustomGroup() {} 31 | //@} 32 | -------------------------------------------------------------------------------- /examples/specific/qtsignalsandslots.h: -------------------------------------------------------------------------------- 1 | #ifndef QT_OBJECT_H 2 | #define QT_OBJECT_H 3 | 4 | /*! 5 | *\brief Forward declaration of QT API class 6 | 7 | QT slots and signals typically `#include `, but this example is parsed without QT SDK installed. 8 | */ 9 | extern class QObject; 10 | 11 | class QtSignalSlotExample: public QObject 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | 17 | /*! 18 | *\param iShownParameter 19 | This is shown in declaration 20 | */ 21 | void workingFunction( int iShownParameter ) { Q_UNUSED( iShownParameter ; ) } 22 | 23 | signals: 24 | 25 | /*! 26 | \param iShown 27 | This is in function declaration 28 | */ 29 | void workingSignal( int iShown ); 30 | 31 | public slots: 32 | 33 | /*! 34 | \param iShown 35 | This is in function declaration 36 | */ 37 | void workingSlot( int iShown ) { iShown; } 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /documentation/source/groups.rst: -------------------------------------------------------------------------------- 1 | 2 | Groups 3 | ====== 4 | 5 | .. cpp:namespace:: @ex_groups 6 | 7 | Breathe has basic support for the grouping functionality that Doxygen provides. 8 | 9 | Using the example from the Doxygen docs: 10 | 11 | .. literalinclude:: code/groups.h 12 | :language: cpp 13 | 14 | If we reference this with a directive, for example: 15 | 16 | .. code-block:: rst 17 | 18 | .. doxygenclass:: UserDefinedGroupTest 19 | :project: userdefined 20 | :members: 21 | :protected-members: 22 | 23 | It renders as: 24 | 25 | .. doxygenclass:: UserDefinedGroupTest 26 | :project: userdefined 27 | :members: 28 | :protected-members: 29 | 30 | 31 | .. note:: 32 | 33 | Any groups which are not named in the original source code will appear as 34 | **Unnamed Group** in the final output. This is different to Doxygen which 35 | will number the groups and so name them as Group1, Group2, Group3, etc. 36 | -------------------------------------------------------------------------------- /tests/data/examples/test_userdefined/userdefined.h: -------------------------------------------------------------------------------- 1 | // Example from Doxygen documentation 2 | 3 | /** A class. More details about the UserDefinedGroupTest class */ 4 | class UserDefinedGroupTest 5 | { 6 | public: 7 | //@{ 8 | /** Same documentation for both members. Details */ 9 | void func1InGroup1(); 10 | void func2InGroup1(); 11 | //@} 12 | 13 | /** Function without group. Details. */ 14 | void ungroupedFunction(); 15 | void func1InCustomGroup(); 16 | protected: 17 | void func2InCustomGroup(); 18 | }; 19 | 20 | void UserDefinedGroupTest::func1InGroup1() {} 21 | void UserDefinedGroupTest::func2InGroup1() {} 22 | 23 | /** @name Custom Group 24 | * Description of custom group 25 | */ 26 | //@{ 27 | /** Function 2 in custom group. Details. */ 28 | void UserDefinedGroupTest::func2InCustomGroup() {} 29 | /** Function 1 in custom group. Details. */ 30 | void UserDefinedGroupTest::func1InCustomGroup() {} 31 | //@} 32 | -------------------------------------------------------------------------------- /tests/data/examples/test_qtsignalsandslots/qtsignalsandslots.h: -------------------------------------------------------------------------------- 1 | #ifndef QT_OBJECT_H 2 | #define QT_OBJECT_H 3 | 4 | /*! 5 | *\brief Forward declaration of QT API class 6 | 7 | QT slots and signals typically `#include `, but this example is parsed without QT SDK installed. 8 | */ 9 | extern class QObject; 10 | 11 | class QtSignalSlotExample: public QObject 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | 17 | /*! 18 | *\param iShownParameter 19 | This is shown in declaration 20 | */ 21 | void workingFunction( int iShownParameter ) { Q_UNUSED( iShownParameter ; ) } 22 | 23 | signals: 24 | 25 | /*! 26 | \param iShown 27 | This is in function declaration 28 | */ 29 | void workingSignal( int iShown ); 30 | 31 | public slots: 32 | 33 | /*! 34 | \param iShown 35 | This is in function declaration 36 | */ 37 | void workingSlot( int iShown ) { iShown; } 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /documentation/source/variable.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _variable-example: 3 | 4 | doxygenvariable Directive Example 5 | ================================= 6 | 7 | Working Example 8 | --------------- 9 | 10 | .. cpp:namespace:: @ex_variable_example 11 | 12 | This should work: 13 | 14 | .. code-block:: rst 15 | 16 | .. doxygenvariable:: global_cache_tree 17 | :project: c_file 18 | 19 | It produces this output: 20 | 21 | .. doxygenvariable:: global_cache_tree 22 | :project: c_file 23 | 24 | Failing Example 25 | --------------- 26 | 27 | .. cpp:namespace:: @ex_variable_failing 28 | 29 | This intentionally fails: 30 | 31 | .. code-block:: rst 32 | 33 | .. doxygenvariable:: made_up_variable 34 | :project: define 35 | 36 | It produces the following warning message: 37 | 38 | .. warning:: 39 | doxygenvariable: Cannot find variable “made_up_variable” in doxygen XML output for project 40 | "tinyxml" from directory: ../../examples/tinyxml/tinyxml/xml/ 41 | -------------------------------------------------------------------------------- /examples/specific/code_blocks.h: -------------------------------------------------------------------------------- 1 | 2 | /** A function with an unannotated code block with C/C++ code. 3 | * 4 | * @code 5 | * char* buffer = new char[42]; 6 | * int charsAdded = sprintf(buffer, "Tabs are normally %d spaces\n", 8); 7 | * @endcode 8 | */ 9 | void with_standard_code_block(); 10 | 11 | /** A function with an unannotated code block with non-C/C++ code. 12 | * 13 | * @code 14 | * set(user_list A B C) 15 | * foreach(element ${user_list}) 16 | * message(STATUS "Element is ${element}") 17 | * endforeach() 18 | * @endcode 19 | * 20 | * Another code-block that explicitly remains not highlighted. 21 | * @code{.unparsed} 22 | * Show this as is. 23 | * @endcode 24 | */ 25 | void with_unannotated_cmake_code_block(); 26 | 27 | /** A function with an annotated cmake code block. 28 | * 29 | * @code{.cmake} 30 | * set(user_list A B C) 31 | * foreach(element ${user_list}) 32 | * message(STATUS "Element is ${element}") 33 | * endforeach() 34 | * @endcode 35 | */ 36 | void with_annotated_cmake_code_block(); 37 | -------------------------------------------------------------------------------- /examples/doxygen/memgrp.cpp: -------------------------------------------------------------------------------- 1 | /** A class. Details */ 2 | class Test9 3 | { 4 | public: 5 | //@{ 6 | /** Same documentation for both members. Details */ 7 | void func1InGroup1(); 8 | void func2InGroup1(); 9 | //@} 10 | 11 | /** Function without group. Details. */ 12 | void ungroupedFunction(); 13 | // intentionally not documenting this member? 14 | void func1InGroup2(); 15 | protected: 16 | void func2InGroup2(); 17 | }; 18 | 19 | void Test9::func1InGroup1() {} 20 | void Test9::func2InGroup1() {} 21 | 22 | /** @name Group2 23 | * Description of group 2. 24 | */ 25 | //@{ 26 | /** Function 2 in group 2. Details. */ 27 | void Test9::func2InGroup2() {} 28 | /** Function 1 in group 2. Details. */ 29 | void Test9::func1InGroup2() {} 30 | //@} 31 | 32 | /*! \file 33 | * docs for this file 34 | */ 35 | 36 | //@{ 37 | //! one description for all members of this group 38 | //! (because DISTRIBUTE_GROUP_DOC is YES in the config file) 39 | #define A 1 40 | #define B 2 41 | void glob_func(); 42 | //@} 43 | -------------------------------------------------------------------------------- /tests/data/examples/test_links/compare.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | class LinksTest 7 | 8 | first struct inside of namespace 9 | This is a longer description with a link to a webpage in the text http://www.github.com in order to test out Breathe’s handling of links. 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/data/examples/test_code_blocks/code_blocks.h: -------------------------------------------------------------------------------- 1 | 2 | /** A function with an unannotated code block with C/C++ code. 3 | * 4 | * @code 5 | * char* buffer = new char[42]; 6 | * int charsAdded = sprintf(buffer, "Tabs are normally %d spaces\n", 8); 7 | * @endcode 8 | */ 9 | void with_standard_code_block(); 10 | 11 | /** A function with an unannotated code block with non-C/C++ code. 12 | * 13 | * @code 14 | * set(user_list A B C) 15 | * foreach(element ${user_list}) 16 | * message(STATUS "Element is ${element}") 17 | * endforeach() 18 | * @endcode 19 | * 20 | * Another code-block that explicitly remains not highlighted. 21 | * @code{.unparsed} 22 | * Show this as is. 23 | * @endcode 24 | */ 25 | void with_unannotated_cmake_code_block(); 26 | 27 | /** A function with an annotated cmake code block. 28 | * 29 | * @code{.cmake} 30 | * set(user_list A B C) 31 | * foreach(element ${user_list}) 32 | * message(STATUS "Element is ${element}") 33 | * endforeach() 34 | * @endcode 35 | */ 36 | void with_annotated_cmake_code_block(); 37 | -------------------------------------------------------------------------------- /examples/specific/nutshell.h: -------------------------------------------------------------------------------- 1 | /** 2 | \file nutshell.h 3 | An overly extended example of how to use breathe 4 | */ 5 | 6 | /*! 7 | With a little bit of a elaboration, should you feel it necessary. 8 | */ 9 | class Nutshell 10 | { 11 | public: 12 | 13 | //! Our tool set 14 | /*! The various tools we can opt to use to crack this particular nut */ 15 | enum Tool 16 | { 17 | kHammer = 0, //!< What? It does the job 18 | kNutCrackers, //!< Boring 19 | kNinjaThrowingStars //!< Stealthy 20 | }; 21 | 22 | //! Nutshell constructor 23 | Nutshell(); 24 | 25 | //! Nutshell destructor 26 | ~Nutshell(); 27 | 28 | /*! Crack that shell with specified tool 29 | 30 | \param tool the tool with which to crack the nut 31 | */ 32 | void crack( Tool tool ); 33 | 34 | /*! 35 | \return Whether or not the nut is cracked 36 | */ 37 | bool isCracked(); 38 | 39 | private: 40 | 41 | //! Our cracked state 42 | bool m_isCracked; 43 | 44 | }; 45 | 46 | 47 | -------------------------------------------------------------------------------- /documentation/source/code/nutshell.h: -------------------------------------------------------------------------------- 1 | /** 2 | \file nutshell.h 3 | An overly extended example of how to use breathe 4 | */ 5 | 6 | /*! 7 | With a little bit of a elaboration, should you feel it necessary. 8 | */ 9 | class Nutshell 10 | { 11 | public: 12 | 13 | //! Our tool set 14 | /*! The various tools we can opt to use to crack this particular nut */ 15 | enum Tool 16 | { 17 | kHammer = 0, //!< What? It does the job 18 | kNutCrackers, //!< Boring 19 | kNinjaThrowingStars //!< Stealthy 20 | }; 21 | 22 | //! Nutshell constructor 23 | Nutshell(); 24 | 25 | //! Nutshell destructor 26 | ~Nutshell(); 27 | 28 | /*! Crack that shell with specified tool 29 | 30 | \param tool - the tool with which to crack the nut 31 | */ 32 | void crack( Tool tool ); 33 | 34 | /*! 35 | \return Whether or not the nut is cracked 36 | */ 37 | bool isCracked(); 38 | 39 | private: 40 | 41 | //! Our cracked state 42 | bool m_isCracked; 43 | 44 | }; 45 | 46 | 47 | -------------------------------------------------------------------------------- /examples/tinyxml/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | set DOXYGEN=doxygen 4 | for /f "delims=" %%i in ('where doxygen') do set DOXYGEN=%%i 5 | 6 | set PERL=perl 7 | for /f "delims=" %%i in ('where perl') do set PERL=%%i 8 | 9 | set HAVE_DOT=dot 10 | for /f "delims=" %%i in ('where dot') do set HAVE_DOT=%%i 11 | 12 | @REM echo DOXYGEN : %DOXYGEN% 13 | @REM echo PERL : %PERL% 14 | @REM echo HAVE_DOT : %HAVE_DOT% 15 | 16 | if "%1" == "" ( 17 | call :all 18 | goto end 19 | ) 20 | 21 | if "%1" == "all" ( 22 | call :all 23 | goto end 24 | ) 25 | 26 | if "%1" == "clean" ( 27 | call :clean 28 | goto end 29 | ) 30 | 31 | goto end 32 | 33 | :all 34 | call :doxygen tinyxml.cfg 35 | goto end 36 | 37 | :clean 38 | call :rmdir tinyxml 39 | goto end 40 | 41 | :doxygen 42 | set CFG=%~1 43 | echo Running doxygen: %CFG% 44 | "%DOXYGEN%" %CFG% 45 | goto end 46 | 47 | :rmdir 48 | set DIR=%~1 49 | if exist "%DIR%" ( 50 | echo Removing directory: %DIR% 51 | rmdir /s/q "%DIR%" 52 | ) 53 | goto end 54 | 55 | :end -------------------------------------------------------------------------------- /tests/data/examples/test_group_member_ref/compare.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The XML output of Doxygen changed in 1.9.7, see 5 | https://github.com/breathe-doc/breathe/pull/934 6 | 7 | 8 | void func2 9 | 10 | another function in group 1 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/specific/template_class_non_type.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief a class with three template parameters 3 | * 4 | * @tparam T this is the first template parameter 5 | * @tparam U this is the second template parameter 6 | * @tparam N this is the third template parameter, it is a non-type parameter 7 | */ 8 | template 9 | class anothertemplateclass 10 | { 11 | public: 12 | /// default constructor 13 | anothertemplateclass() {} 14 | 15 | /** 16 | * @brief constructor with two template argument 17 | * 18 | * @param m1 first argument 19 | * @param m2 second argument 20 | */ 21 | anothertemplateclass(T const & m1, U const & m2) : 22 | member1(m1), member2(m2) {} 23 | 24 | /** 25 | * @brief member accepting template argument and returning template argument 26 | * 27 | * @param t argument 28 | * @return returns value of type U 29 | */ 30 | U method(T const & t); 31 | 32 | private: 33 | /// a member with templated type 34 | T member1; 35 | 36 | /// another member with templated type 37 | U member2; 38 | }; 39 | -------------------------------------------------------------------------------- /tests/data/examples/test_html_entities/compare.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | void noop 7 | 8 | x ¡¢£¤¥¦§¨©ª «¬­®¯°±²³´µ¶ ·¸¹º»¼½¾¿À ÁÂÃÄÅÆÇÈÉÊ ËÌÍÎÏÐÑÒÓÔ ÕÖרÙÚÛÜÝÞ ßàáâãäåæçè éêëìíîïðñò óôõö÷øùúûü ýþÿƒΑΒΓΔΕΖΗ ΘΙΚΛΜΝΞΟΠΡΣΤ ΥΦΧΨΩαβγδεζ ηθικλμνξοπρς στυφχψωϑϒϖ• …′″‾⁄℘ℑℜ™ℵ ←↑→↓↔↵⇐⇑⇒⇓⇔∀ ∂∃∅∇∈∉∋∏∑−∗√ ∝∞∠∧∨∩∪∫∴∼≅≈≠ ≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈ ⌉⌊⌋⟨⟩◊♠♣♥♦Œ œŠšŸˆ˜   ‌‍ ‎‏–—‘’‚“”„† ‡‰‹›€™’x 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/data/examples/test_latexmath/compare.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | class MathHelper 7 | 8 | A class. 9 | A inline formula: f(x) = a + b 10 | A display style formula: 11 | \int_a^b f(x) dx = F(b) - F(a) 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/data/examples/test_template_class_non_type/template_class_non_type.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief a class with three template parameters 3 | * 4 | * @tparam T this is the first template parameter 5 | * @tparam U this is the second template parameter 6 | * @tparam N this is the third template parameter, it is a non-type parameter 7 | */ 8 | template 9 | class anothertemplateclass 10 | { 11 | public: 12 | /// default constructor 13 | anothertemplateclass() {} 14 | 15 | /** 16 | * @brief constructor with two template argument 17 | * 18 | * @param m1 first argument 19 | * @param m2 second argument 20 | */ 21 | anothertemplateclass(T const & m1, U const & m2) : 22 | member1(m1), member2(m2) {} 23 | 24 | /** 25 | * @brief member accepting template argument and returning template argument 26 | * 27 | * @param t argument 28 | * @return returns value of type U 29 | */ 30 | U method(T const & t); 31 | 32 | private: 33 | /// a member with templated type 34 | T member1; 35 | 36 | /// another member with templated type 37 | U member2; 38 | }; 39 | -------------------------------------------------------------------------------- /examples/specific/template_function.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /** 4 | * @brief a function with one template arguments 5 | * 6 | * @tparam T this is the template parameter 7 | * 8 | * @param arg1 argument of type T 9 | * 10 | * @return return value of type T 11 | */ 12 | template 13 | T function1(T arg1) 14 | {} 15 | 16 | 17 | /** 18 | * @brief a function with one template argument specialized for `std::string` 19 | * 20 | * @param arg1 argument of type `std::string` 21 | * 22 | * @return return value of type `std::string` 23 | */ 24 | template <> 25 | std::string function1(std::string arg1) 26 | {} 27 | 28 | 29 | /** 30 | * @brief a function with three template arguments 31 | * 32 | * @tparam T this is the first template parameter 33 | * @tparam U this is the second template parameter 34 | * @tparam N this is the third template parameter, it is a non-type parameter 35 | * 36 | * @param arg1 first argument of type T 37 | * @param arg2 second argument of type U 38 | * 39 | * @return return value of type T 40 | */ 41 | template 42 | T function2(T arg1, U arg2) 43 | {} 44 | -------------------------------------------------------------------------------- /breathe/filetypes.py: -------------------------------------------------------------------------------- 1 | """ 2 | A module to house the methods for resolving a code-blocks language based on filename 3 | (and extension). 4 | """ 5 | 6 | from __future__ import annotations 7 | 8 | import os.path 9 | 10 | from pygments.lexers import get_lexer_for_filename 11 | from pygments.util import ClassNotFound 12 | 13 | 14 | def get_pygments_alias(filename: str) -> str | None: 15 | "Find first pygments alias from filename" 16 | try: 17 | lexer_cls = get_lexer_for_filename(filename) 18 | return lexer_cls.aliases[0] # type: ignore[attr-defined] 19 | except ClassNotFound: 20 | return None 21 | 22 | 23 | def get_extension(filename: str) -> str: 24 | """Get extension from filename.""" 25 | # If the filename is just '.ext' then we get ('.ext', '') so we fall back to first part if 26 | # the second isn't there 27 | (first, second) = os.path.splitext(filename) 28 | 29 | # Doxygen allows users to specify the file extension ".unparsed" to disable syntax highlighting. 30 | # We translate it into the pygments un-highlighted 'text' type 31 | return (second or first).lstrip(".").replace("unparsed", "text") 32 | -------------------------------------------------------------------------------- /documentation/source/differences.rst: -------------------------------------------------------------------------------- 1 | 2 | Deviations from Doxygen & Autodoc 3 | ================================= 4 | 5 | As Breathe attempts to bridge the gap between Sphinx and Doxygen it is confined 6 | by both what Doxygen outputs in its XML and what Sphinx will accept through the 7 | Docutils document model. 8 | 9 | This leads to a few differences between Breathe output and the Doxygen HTML 10 | output and the Sphinx Autodoc output. 11 | 12 | These are incomplete lists but we're keen to expand them as issues are brought 13 | to our attention. 14 | 15 | Doxygen 16 | ------- 17 | 18 | - Doxygen allows both HTML and Markdown syntax for headings in comments. These 19 | are rendered as standard HTML headings in the output (h1, h2, h3, etc.) 20 | 21 | RestructuredText only allows headings at the start of document sections and 22 | you cannot put arbitrary sections into the output to gain the appearance of 23 | headings so any headings found in the doxygen comments are rendered as 24 | emphasized text in the Breathe HTML output. 25 | 26 | 27 | Sphinx Autodoc 28 | -------------- 29 | 30 | - No differences highlighted yet, though they certainly exist. 31 | -------------------------------------------------------------------------------- /tests/data/examples/test_cpp_concept/compare.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | template<typename T>concept Hashable 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /documentation/source/enum.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _enum-example: 3 | 4 | doxygenenum Directive Example 5 | =============================== 6 | 7 | Working Example 8 | --------------- 9 | 10 | .. cpp:namespace:: @ex_enum_example 11 | 12 | This should work: 13 | 14 | .. code-block:: rst 15 | 16 | .. doxygenenum:: NodeType 17 | :project: tinyxml 18 | 19 | It produces this output: 20 | 21 | .. doxygenenum:: NodeType 22 | :project: tinyxml 23 | 24 | Example with Namespace 25 | ---------------------- 26 | 27 | .. cpp:namespace:: @ex_enum_namespace 28 | 29 | This should work: 30 | 31 | .. code-block:: rst 32 | 33 | .. doxygenenum:: foo::ns::Letters 34 | :project: namespace 35 | 36 | It produces this output: 37 | 38 | .. doxygenenum:: foo::ns::Letters 39 | :project: namespace 40 | 41 | Failing Example 42 | --------------- 43 | 44 | .. cpp:namespace:: @ex_enum_failing 45 | 46 | This intentionally fails: 47 | 48 | .. code-block:: rst 49 | 50 | .. doxygenenum:: made_up_enum 51 | :project: restypedef 52 | 53 | It produces the following warning message: 54 | 55 | .. warning:: 56 | doxygenenum: Cannot find enum "made_up_enum" in doxygen xml output 57 | -------------------------------------------------------------------------------- /tests/data/examples/test_image/compare.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | class ImageClass 7 | 8 | This is a class with an image in the description. 9 | It renders like this: 10 | 11 | Breathe & Sphinx should automatically copy the image from the doxygen output directory into the _images folder of the Sphinx output. 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /documentation/source/typedef.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _typedef-example: 3 | 4 | doxygentypedef Directive Example 5 | ================================ 6 | 7 | Working Example 8 | --------------- 9 | 10 | .. cpp:namespace:: @ex_typedef_example 11 | 12 | This should work: 13 | 14 | .. code-block:: rst 15 | 16 | .. doxygentypedef:: UINT32 17 | :project: structcmd 18 | 19 | It produces this output: 20 | 21 | .. doxygentypedef:: UINT32 22 | :project: structcmd 23 | 24 | Example with Namespace 25 | ---------------------- 26 | 27 | .. cpp:namespace:: @ex_typedef_namespace 28 | 29 | This should work: 30 | 31 | .. code-block:: rst 32 | 33 | .. doxygentypedef:: foo::ns::MyInt 34 | :project: namespace 35 | 36 | It produces this output: 37 | 38 | .. doxygentypedef:: foo::ns::MyInt 39 | :project: namespace 40 | 41 | Failing Example 42 | --------------- 43 | 44 | .. cpp:namespace:: @ex_typedef_failing 45 | 46 | This intentionally fails: 47 | 48 | .. code-block:: rst 49 | 50 | .. doxygentypedef:: made_up_typedef 51 | :project: restypedef 52 | 53 | It produces the following warning message: 54 | 55 | .. warning:: 56 | doxygentypedef: Cannot find typedef "made_up_typedef" in doxygen xml output 57 | -------------------------------------------------------------------------------- /documentation/source/members.rst: -------------------------------------------------------------------------------- 1 | 2 | Members Tests 3 | ============= 4 | 5 | All Members 6 | ----------- 7 | 8 | .. cpp:namespace:: @ex_members_all 9 | 10 | .. doxygenclass:: testnamespace::NamespacedClassTest 11 | :path: ../../examples/specific/members/xml 12 | :members: 13 | 14 | Specific Members 15 | ---------------- 16 | 17 | .. cpp:namespace:: @ex_members_specific 18 | 19 | .. doxygenclass:: testnamespace::NamespacedClassTest 20 | :path: ../../examples/specific/members/xml 21 | :members: functionS, anotherFunction 22 | :no-link: 23 | 24 | No Members 25 | ---------- 26 | 27 | .. cpp:namespace:: @ex_members_no 28 | 29 | .. doxygenclass:: testnamespace::NamespacedClassTest 30 | :path: ../../examples/specific/members/xml 31 | :no-link: 32 | 33 | Struct Members 34 | ---------------- 35 | 36 | .. cpp:namespace:: @ex_members_struct 37 | 38 | .. doxygenfunction:: testnamespace::MyClass::MyClass() 39 | :path: ../../examples/specific/struct_function/xml 40 | 41 | .. doxygenfunction:: testnamespace::MyClass::MyClass(const MyClass&) 42 | :path: ../../examples/specific/struct_function/xml 43 | 44 | .. doxygenvariable:: testnamespace::MyClass::myMemberVar 45 | :path: ../../examples/specific/struct_function/xml 46 | -------------------------------------------------------------------------------- /documentation/source/enumvalue.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _enumvalue-example: 3 | 4 | doxygenenumvalue Directive Example 5 | ================================== 6 | 7 | Working Example 8 | --------------- 9 | 10 | .. cpp:namespace:: @ex_enumvalue_example 11 | 12 | This should work: 13 | 14 | .. code-block:: rst 15 | 16 | .. doxygenenumvalue:: TIXML_NO_ERROR 17 | :project: tinyxml 18 | 19 | It produces this output: 20 | 21 | .. doxygenenumvalue:: TIXML_NO_ERROR 22 | :project: tinyxml 23 | 24 | Example with Namespace 25 | ---------------------- 26 | 27 | .. cpp:namespace:: @ex_enumvalue_namespace 28 | 29 | This should work: 30 | 31 | .. code-block:: rst 32 | 33 | .. doxygenenumvalue:: foo::ns::A 34 | :project: namespace 35 | 36 | It produces this output: 37 | 38 | .. doxygenenumvalue:: foo::ns::A 39 | :project: namespace 40 | 41 | Failing Example 42 | --------------- 43 | 44 | .. cpp:namespace:: @ex_enumvalue_failing 45 | 46 | This intentionally fails: 47 | 48 | .. code-block:: rst 49 | 50 | .. doxygenenumvalue:: made_up_enumvalue 51 | :project: restypedef 52 | 53 | It produces the following warning message: 54 | 55 | .. warning:: 56 | doxygenenumvalue: Cannot find enumvalue "made_up_enumvalue" in doxygen xml output 57 | -------------------------------------------------------------------------------- /documentation/source/union.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _union-example: 3 | 4 | doxygenunion Directive Example 5 | ============================== 6 | 7 | Working Example 8 | --------------- 9 | 10 | .. cpp:namespace:: @ex_union_example 11 | 12 | This should work: 13 | 14 | .. code-block:: rst 15 | 16 | .. doxygenunion:: SeparateUnion 17 | :project: union 18 | 19 | It produces this output: 20 | 21 | .. doxygenunion:: SeparateUnion 22 | :project: union 23 | 24 | Example with Namespace 25 | ---------------------- 26 | 27 | .. cpp:namespace:: @ex_union_namespace 28 | 29 | This should work: 30 | 31 | .. code-block:: rst 32 | 33 | .. doxygenunion:: foo::MyUnion 34 | :project: union 35 | 36 | It produces this output: 37 | 38 | .. doxygenunion:: foo::MyUnion 39 | :project: union 40 | 41 | Failing Example 42 | --------------- 43 | 44 | .. cpp:namespace:: @ex_union_failing 45 | 46 | This intentionally fails: 47 | 48 | .. code-block:: rst 49 | 50 | .. doxygenunion:: made_up_union 51 | :project: union 52 | 53 | It produces the following warning message: 54 | 55 | .. warning:: 56 | doxygenunion: Cannot find union "made_up_union" in doxygen XML 57 | output for project "union" from directory: ../../examples/specific/union/xml/ 58 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | /.project 3 | /.pydevproject 4 | build/ 5 | /dist 6 | /breathe.egg-info 7 | /.mypy_cache 8 | 9 | # Folder for placing stuff to be ignored 10 | /ignored 11 | 12 | # My virtual env folder 13 | /python-2.7.4 14 | 15 | # Test folder for building simple examples of the documentation 16 | /simple 17 | 18 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm 19 | 20 | ## Directory-based project format 21 | .idea/ 22 | # if you remove the above rule, at least ignore user-specific stuff: 23 | # .idea/workspace.xml 24 | # .idea/tasks.xml 25 | # and these sensitive or high-churn files: 26 | # .idea/dataSources.ids 27 | # .idea/dataSources.xml 28 | # .idea/sqlDataSources.xml 29 | # .idea/dynamic.xml 30 | 31 | ## File-based project format 32 | *.ipr 33 | *.iws 34 | *.iml 35 | 36 | ## Additional for IntelliJ 37 | out/ 38 | 39 | # generated by mpeltonen/sbt-idea plugin 40 | .idea_modules/ 41 | 42 | # generated by JIRA plugin 43 | atlassian-ide-plugin.xml 44 | 45 | # generated by Crashlytics plugin (for Android Studio and Intellij) 46 | com_crashlytics_export_strings.xml 47 | 48 | # modified by build process 49 | examples/doxygen/example.tag 50 | examples/specific/dot_graphs/xml/dotfile.dot 51 | 52 | # generated in editable install 53 | /breathe/_parser.py 54 | -------------------------------------------------------------------------------- /.github/workflows/cache_doxygen.yml: -------------------------------------------------------------------------------- 1 | name: download and cache Doxygen 2 | on: 3 | workflow_call 4 | jobs: 5 | install: 6 | runs-on: ubuntu-latest 7 | concurrency: 8 | group: linux-doxygen-${{ matrix.doxygen-version }}-cache 9 | strategy: 10 | fail-fast: false 11 | matrix: 12 | doxygen-version: ['1.9.4', '1.9.7'] 13 | steps: 14 | - uses: actions/cache/restore@v4 15 | id: cache-doxygen 16 | with: 17 | path: doxygen-bin-arc 18 | key: ${{ runner.os }}-doxygen-${{ matrix.doxygen-version }} 19 | lookup-only: true 20 | restore-keys: | 21 | ${{ runner.os }}-doxygen- 22 | 23 | # TODO: Change to using github release downloads if possible 24 | - name: download Doxygen from SF binary archives 25 | if: steps.cache-doxygen.outputs.cache-hit != 'true' 26 | run: | 27 | mkdir doxygen-bin-arc && cd doxygen-bin-arc 28 | curl -L https://sourceforge.net/projects/doxygen/files/rel-${{ matrix.doxygen-version }}/doxygen-${{ matrix.doxygen-version }}.linux.bin.tar.gz > doxygen.tar.gz 29 | 30 | - uses: actions/cache/save@v4 31 | if: steps.cache-doxygen.outputs.cache-hit != 'true' 32 | with: 33 | path: doxygen-bin-arc 34 | key: ${{ steps.cache-doxygen.outputs.cache-primary-key }} 35 | -------------------------------------------------------------------------------- /tests/data/examples/test_template_function/template_function.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /** 4 | * @brief a function with one template arguments 5 | * 6 | * @tparam T this is the template parameter 7 | * 8 | * @param arg1 argument of type T 9 | * 10 | * @return return value of type T 11 | */ 12 | template 13 | T function1(T arg1) 14 | {} 15 | 16 | 17 | /** 18 | * @brief a function with one template argument specialized for `std::string` 19 | * 20 | * @param arg1 argument of type `std::string` 21 | * 22 | * @return return value of type `std::string` 23 | */ 24 | template <> 25 | std::string function1(std::string arg1) 26 | {} 27 | 28 | 29 | /** 30 | * @brief a function with three template arguments 31 | * 32 | * @tparam T this is the first template parameter 33 | * @tparam U this is the second template parameter 34 | * @tparam N this is the third template parameter, it is a non-type parameter 35 | * 36 | * @param arg1 first argument of type T 37 | * @param arg2 second argument of type U 38 | * 39 | * @return return value of type T 40 | */ 41 | template 42 | T function2(T arg1, U arg2) 43 | {} 44 | 45 | /** 46 | * @brief a function with unnamed arguments and an argument with a default 47 | * value 48 | */ 49 | template 50 | void function3() 51 | {} 52 | 53 | -------------------------------------------------------------------------------- /breathe/renderer/target.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from typing import TYPE_CHECKING 4 | 5 | from docutils import nodes 6 | from sphinx.util.nodes import make_id 7 | 8 | if TYPE_CHECKING: 9 | from collections.abc import Mapping, Sequence 10 | from typing import Any, Callable 11 | 12 | from docutils.nodes import Element 13 | from sphinx.environment import BuildEnvironment 14 | 15 | TargetHandler = Callable[[nodes.document, str], Sequence[Element]] 16 | 17 | 18 | class _RealTargetHandler: 19 | def __init__(self, env: BuildEnvironment): 20 | self.env = env 21 | 22 | def __call__(self, document: nodes.document, refid: str) -> list[Element]: 23 | """Creates a target node, registers it with the document and returns it in a list""" 24 | 25 | if refid in document.ids: 26 | # Sphinx will already warn about a duplicate declaration so we don't 27 | # need any warnings here 28 | refid = make_id(self.env, document) 29 | 30 | target = nodes.target(ids=[refid], names=[refid]) 31 | document.note_explicit_target(target) 32 | 33 | return [target] 34 | 35 | 36 | def create_target_handler(options: Mapping[str, Any], env: BuildEnvironment) -> TargetHandler: 37 | if "no-link" in options: 38 | return lambda document, refid: [] 39 | return _RealTargetHandler(env) 40 | -------------------------------------------------------------------------------- /examples/specific/dotfile.dot: -------------------------------------------------------------------------------- 1 | digraph G {bgcolor="red:cyan" gradientangle=0 2 | 3 | subgraph cluster_0 { 4 | style=filled; 5 | color=lightgrey; 6 | fillcolor="blue:yellow"; 7 | gradientangle=90; 8 | node [fillcolor="yellow:green" style=filled gradientangle=270] a0; 9 | node [fillcolor="green:red"] a1; 10 | node [fillcolor="red:cyan"] a2; 11 | node [fillcolor="cyan:blue"] a3; 12 | 13 | a0 -> a1 -> a2 -> a3; 14 | label = "process #1"; 15 | } 16 | 17 | subgraph cluster_1 { 18 | node [fillcolor="yellow:magenta" 19 | style=filled gradientangle=270] b0; 20 | node [fillcolor="magenta:cyan"] b1; 21 | node [fillcolor="cyan:red"] b2; 22 | node [fillcolor="red:blue"] b3; 23 | 24 | b0 -> b1 -> b2 -> b3; 25 | label = "process #2"; 26 | color=blue 27 | fillcolor="blue:yellow"; 28 | style=filled; 29 | gradientangle=90; 30 | } 31 | start -> a0; 32 | start -> b0; 33 | a1 -> b3; 34 | b2 -> a3; 35 | a3 -> a0; 36 | a3 -> end; 37 | b3 -> end; 38 | 39 | start [shape=Mdiamond , 40 | fillcolor="yellow:brown", 41 | gradientangle=90, 42 | style=radial]; 43 | end [shape=Msquare, 44 | fillcolor="orange:blue", 45 | style=radial, 46 | gradientangle=90]; 47 | } 48 | -------------------------------------------------------------------------------- /tests/data/examples/test_dot_graphs/dotfile.dot: -------------------------------------------------------------------------------- 1 | digraph G {bgcolor="red:cyan" gradientangle=0 2 | 3 | subgraph cluster_0 { 4 | style=filled; 5 | color=lightgrey; 6 | fillcolor="blue:yellow"; 7 | gradientangle=90; 8 | node [fillcolor="yellow:green" style=filled gradientangle=270] a0; 9 | node [fillcolor="green:red"] a1; 10 | node [fillcolor="red:cyan"] a2; 11 | node [fillcolor="cyan:blue"] a3; 12 | 13 | a0 -> a1 -> a2 -> a3; 14 | label = "process #1"; 15 | } 16 | 17 | subgraph cluster_1 { 18 | node [fillcolor="yellow:magenta" 19 | style=filled gradientangle=270] b0; 20 | node [fillcolor="magenta:cyan"] b1; 21 | node [fillcolor="cyan:red"] b2; 22 | node [fillcolor="red:blue"] b3; 23 | 24 | b0 -> b1 -> b2 -> b3; 25 | label = "process #2"; 26 | color=blue 27 | fillcolor="blue:yellow"; 28 | style=filled; 29 | gradientangle=90; 30 | } 31 | start -> a0; 32 | start -> b0; 33 | a1 -> b3; 34 | b2 -> a3; 35 | a3 -> a0; 36 | a3 -> end; 37 | b3 -> end; 38 | 39 | start [shape=Mdiamond , 40 | fillcolor="yellow:brown", 41 | gradientangle=90, 42 | style=radial]; 43 | end [shape=Msquare, 44 | fillcolor="orange:blue", 45 | style=radial, 46 | gradientangle=90]; 47 | } 48 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | RM = rm -f 2 | GENERATED_MOD = breathe/_parser.py 3 | 4 | .PHONY: all 5 | all: html pdf 6 | 7 | .PHONY: html 8 | html: data 9 | $(MAKE) -C documentation html 10 | 11 | .PHONY: pdf 12 | pdf: data 13 | $(MAKE) -C documentation latexpdf 14 | 15 | .PHONY: data 16 | data: 17 | $(MAKE) -C examples/doxygen all 18 | $(MAKE) -C examples/tinyxml all 19 | $(MAKE) -C examples/specific all 20 | 21 | $(GENERATED_MOD): \ 22 | xml_parser_generator/schema.json \ 23 | xml_parser_generator/module_template.py.in \ 24 | xml_parser_generator/make_parser.py 25 | python3 xml_parser_generator/setuptools_builder.py 26 | 27 | .PHONY: parser 28 | parser: $(GENERATED_MOD) 29 | 30 | .PHONY: format-parser 31 | format-parser: 32 | ruff format $(GENERATED_MOD) 33 | 34 | .PHONY: distclean 35 | distclean: clean 36 | $(MAKE) -C documentation clean 37 | $(RM) $(GENERATED_MOD) 38 | 39 | .PHONY: clean 40 | clean: 41 | $(MAKE) -C examples/doxygen $@ 42 | $(MAKE) -C examples/tinyxml $@ 43 | $(MAKE) -C examples/specific $@ 44 | 45 | .PHONY: test 46 | test: $(GENERATED_MOD) 47 | cd tests && python3 -m pytest -v --maxfail=1 48 | 49 | .PHONY: dev-test 50 | dev-test: $(GENERATED_MOD) 51 | cd tests && PYTHONPATH=../:$(PYTHONPATH) python3 -m pytest -v 52 | 53 | .PHONY: ruff 54 | ruff: 55 | ruff check 56 | ruff format 57 | 58 | .PHONY: type-check 59 | type-check: $(GENERATED_MOD) 60 | mypy --warn-redundant-casts --warn-unused-ignores breathe tests 61 | -------------------------------------------------------------------------------- /documentation/source/template.rst: -------------------------------------------------------------------------------- 1 | Template 2 | ======== 3 | 4 | .. cpp:namespace:: @ex_template_first 5 | 6 | Breathe has support for class and function templates. They are output as 7 | follows. For a class with a single template parameter: 8 | 9 | .. code-block:: rst 10 | 11 | .. doxygenclass:: templateclass 12 | :project: template_class 13 | :members: 14 | 15 | It renders as: 16 | 17 | ---- 18 | 19 | .. doxygenclass:: templateclass 20 | :project: template_class 21 | :members: 22 | 23 | ---- 24 | 25 | .. cpp:namespace:: @ex_template_multiple 26 | 27 | With multiple template parameters it renders as: 28 | 29 | ---- 30 | 31 | .. doxygenclass:: anothertemplateclass 32 | :project: template_class_non_type 33 | :members: 34 | 35 | ---- 36 | 37 | .. cpp:namespace:: @ex_template_function_single 38 | 39 | A function with single template parameter renders as: 40 | 41 | ---- 42 | 43 | .. doxygenfunction:: function1 44 | :project: template_function 45 | 46 | ---- 47 | 48 | .. cpp:namespace:: @ex_template_function_single_specialization 49 | 50 | If specialized for a given type it renders as: 51 | 52 | ---- 53 | 54 | .. doxygenfunction:: function1< std::string > 55 | :project: template_function 56 | 57 | ---- 58 | 59 | .. cpp:namespace:: @ex_template_function_multiple 60 | 61 | With multiple template parameters it renders as: 62 | 63 | ---- 64 | 65 | .. doxygenfunction:: function2 66 | :project: template_function 67 | -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import pathlib 4 | 5 | import pytest 6 | 7 | # Register sphinx fixtures 8 | # 9 | # Disable ruff warnings about unused imports as the import is the registration (I think) 10 | from sphinx.testing.fixtures import ( 11 | app_params, # noqa: F401 12 | make_app, # noqa: F401 13 | rootdir, # noqa: F401 14 | shared_result, # noqa: F401 15 | sphinx_test_tempdir, # noqa: F401 16 | test_params, # noqa: F401 17 | ) 18 | 19 | 20 | # Disable ruff warnings about unused arguments as they are there by convention (I assume) 21 | @pytest.fixture 22 | def app(test_params, app_params, make_app, shared_result): # noqa: F811 23 | """ 24 | Based on sphinx.testing.fixtures.app 25 | """ 26 | args, kwargs = app_params 27 | assert "srcdir" in kwargs 28 | pathlib.Path(kwargs["srcdir"]).mkdir(parents=True, exist_ok=True) 29 | (kwargs["srcdir"] / "conf.py").write_text("", encoding="utf-8") 30 | app_ = make_app(*args, **kwargs) 31 | yield app_ 32 | 33 | print("# testroot:", kwargs.get("testroot", "root")) 34 | print("# builder:", app_.builder.name) 35 | print("# srcdir:", app_.srcdir) 36 | print("# outdir:", app_.outdir) 37 | print("# status:", "\n" + app_._status.getvalue()) 38 | print("# warning:", "\n" + app_._warning.getvalue()) 39 | 40 | if test_params["shared_result"]: 41 | shared_result.store(test_params["shared_result"], app_) 42 | -------------------------------------------------------------------------------- /tests/data/docutils.css: -------------------------------------------------------------------------------- 1 | /* A style sheet for the "compare.xml" files in the example tests. 2 | 3 | This lets the files be viewed in a browser and makes them much easier to 4 | inspect manually. */ 5 | 6 | document { display: block; } 7 | desc { 8 | display: block; 9 | margin-bottom: 1em; 10 | } 11 | desc_content { 12 | display: block; 13 | margin-left: 2em; 14 | } 15 | desc_signature_line { display: block; } 16 | desc_sig_keyword { color: rgb(9, 9, 167); } 17 | desc_sig_keyword_type { color: rgb(57, 93, 160); } 18 | desc_name { color: darkcyan; } 19 | paragraph { 20 | display: block; 21 | margin: 1em 0; 22 | } 23 | emphasis { font-style: italic; } 24 | strong { font-weight: bold; } 25 | comment { color: darkgreen; } 26 | index::before { 27 | display: block; 28 | content: attr(entries); 29 | color: gray; 30 | font-style: italic; 31 | } 32 | desc_parameterlist::before { content: "("; } 33 | desc_parameterlist::after { content: ")"; } 34 | desc_parameter + desc_parameter::before { content: ", "; } 35 | 36 | table tgroup { display: table; } 37 | table thead { display: table-header-group; } 38 | table tbody { display: table-row-group; } 39 | table row { display: table-row; } 40 | table entry { 41 | display: table-cell; 42 | padding: 0 0.3em; 43 | } 44 | colspec { display: none; } 45 | 46 | section { display: block; } 47 | section title { font-size: 1.5em; display: block; font-weight: bold; } 48 | section section title { font-size: 1.17em; } 49 | section section section title { font-size: 1em; } 50 | 51 | -------------------------------------------------------------------------------- /examples/specific/functionOverload.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | //! Non overloaded function 4 | void simplefunc(); 5 | 6 | //! Function which takes two int arguments 7 | void f(int, int); 8 | 9 | //! Function which takes two double arguments 10 | void f(double, double); 11 | 12 | namespace test { 13 | 14 | //! Another function which takes two int arguments 15 | void g(int, int); 16 | 17 | //! Another function which takes two double arguments 18 | void g(double, double); 19 | 20 | } 21 | 22 | /*! needed for references in global function parameters */ 23 | class MyType {}; 24 | 25 | /*! needed for references in global function parameters */ 26 | class MyOtherType {}; 27 | 28 | //! Another function which takes a custom type 29 | void h(std::string, MyType); 30 | 31 | //! Another function which takes another custom type 32 | void h(std::string, MyOtherType o); 33 | 34 | //! Another function which takes a basic type 35 | void h(std::string, float myfloat); 36 | 37 | //! Another function which takes a const custom type 38 | void h(std::string, const MyType& mytype); 39 | 40 | //! Another function which takes a const basic type 41 | void h(std::string, const int myint); 42 | 43 | //! Another function which takes a const basic type 44 | template 45 | void h(std::string, const T myType); 46 | 47 | //! Another function which takes a const basic type 48 | template 49 | void h(std::string, const T m, const U n); 50 | 51 | 52 | /** 53 | * Test function 1. 54 | */ 55 | void j(int); 56 | 57 | /** 58 | * Test function 2. 59 | */ 60 | void j(char); 61 | -------------------------------------------------------------------------------- /documentation/source/page.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _page-example: 3 | 4 | doxygenpage Directive 5 | ===================== 6 | 7 | This directive generates the appropriate output for the contents of a doxygen 8 | page. A doxygen page is created for each "key" of every \\xrefitem command used 9 | for markup in the source comments. For more information check the 10 | `doxygen documentation`_. 11 | 12 | It takes the standard ``project`` and ``path`` options. 13 | 14 | .. code-block:: rst 15 | 16 | .. doxygenpage:: 17 | :project: ... 18 | :path: ... 19 | 20 | .. _doxygen documentation: https://www.doxygen.nl/manual/commands.html#cmdxrefitem 21 | 22 | 23 | 24 | Basic Example 25 | ------------- 26 | 27 | .. cpp:namespace:: @ex_page_basic 28 | 29 | The plain ``doxygenpage`` directive will output the page name and description 30 | and any variable entries which were defined to be part of this page (with an 31 | \xrefitem usage). 32 | 33 | .. code-block:: rst 34 | 35 | .. doxygenpage:: xrefsample 36 | :project: xrefsect 37 | 38 | It produces this output: 39 | 40 | .. doxygenpage:: xrefsample 41 | :project: xrefsect 42 | 43 | 44 | Failing Example 45 | --------------- 46 | 47 | .. cpp:namespace:: @ex_page_failing 48 | 49 | This intentionally fails: 50 | 51 | .. code-block:: rst 52 | 53 | .. doxygengroup:: madeuppage 54 | :project: xrefsect 55 | 56 | It produces the following warning message: 57 | 58 | .. warning:: 59 | Cannot find file "madeuppage" in doxygen xml output for project 60 | "xrefsect" from directory: ../../examples/specific/xrefsect/xml/ 61 | -------------------------------------------------------------------------------- /CONTRIBUTORS.rst: -------------------------------------------------------------------------------- 1 | Contributors 2 | ============ 3 | 4 | Many thanks to everyone that has contributed to the project. 5 | 6 | - `Andne `_ 7 | - `arximboldi `_ 8 | - `D4N `_ 9 | - `dean0x7d `_ 10 | - `dg-dboehi `_ 11 | - `eric-wieser `_ 12 | - `fetzerch `_ 13 | - `gmarull `_ 14 | - `hidmic `_ 15 | - `ishitatsuyuki `_ 16 | - `jakobandersen `_ 17 | - `mattip `_ 18 | - `michaeljones `_ 19 | - `nijel `_ 20 | - `olitheolix `_ 21 | - `pczerkas `_ 22 | - `queezythegreat `_ 23 | - `remyleone `_ 24 | - `rhssk `_ 25 | - `rogerbarton `_ 26 | - `ropg `_ 27 | - `rscohn2 `_ 28 | - `rweickelt `_ 29 | - `SylvainCorlay `_ 30 | - `t-b `_ 31 | - `Tiwalun `_ 32 | - `utzig `_ 33 | - `vermeeren `_ 34 | - `vitaut `_ 35 | - `xuhongxu96 `_ 36 | 37 | And many more via issues and suggestions. 38 | -------------------------------------------------------------------------------- /breathe/README.rst: -------------------------------------------------------------------------------- 1 | 2 | breathe 3 | ======= 4 | 5 | - **Subpackages** 6 | 7 | - **directive** - Contains some rst directive definitions. These were split out 8 | of `directives.py` when it started to become too large. 9 | - **finder** - Provides classes for finding nodes within the set of xml 10 | files generated by doxygen. Finders are generally used in the `run` methods of 11 | the directives to find the xml node which is then passed to the renderer to 12 | create the output. 13 | - **renderer** - Provides classes for rendering an xml node from the doxygen xml 14 | into docutils rst nodes which can be used by Sphinx. Breathe should ideally 15 | only produce rst nodes and not concern itself with the final output (html, 16 | latex, etc.) 17 | 18 | - **Submodules** 19 | 20 | - **directives** - Contains the definitions of some of the directives. The rest 21 | are in the files in the `directive` folder. It also contains all the set up 22 | code which registers with Sphinx and wires together all the various factories. 23 | - **parser** - Contains code for parsing the doxygen xml into a tree of Python 24 | objects. Most of its content is imported from `_parser`, which is generated 25 | automatically when Breathe is built. 26 | - **process** - Contains the code responsible for running the `doxygen` process 27 | when using the `autodoxygen` directives. 28 | - **project** - Handles the concept of a `Project` which is the breathe term for 29 | a folder full of doxygen xml files. 30 | - **exception** - Contains the base class for all custom exceptions. 31 | -------------------------------------------------------------------------------- /examples/doxygen/manual.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file manual.c 3 | */ 4 | 5 | typedef struct Object Object; //!< Object type 6 | typedef struct Vehicle Vehicle; //!< Vehicle type 7 | typedef struct Car Car; //!< Car type 8 | typedef struct Truck Truck; //!< Truck type 9 | 10 | /*! 11 | * Base object class. 12 | */ 13 | struct Object 14 | { 15 | int ref; //!< \private Reference count. 16 | }; 17 | 18 | 19 | /*! 20 | * Increments object reference count by one. 21 | * \public \memberof Object 22 | */ 23 | static Object * objRef(Object *obj); 24 | 25 | 26 | /*! 27 | * Decrements object reference count by one. 28 | * \public \memberof Object 29 | */ 30 | static Object * objUnref(Object *obj); 31 | 32 | 33 | /*! 34 | * Vehicle class. 35 | * \extends Object 36 | */ 37 | struct Vehicle 38 | { 39 | Object base; //!< \protected Base class. 40 | }; 41 | 42 | 43 | /*! 44 | * Starts the vehicle. 45 | * \public \memberof Vehicle 46 | */ 47 | void vehicleStart(Vehicle *obj); 48 | 49 | 50 | /*! 51 | * Stops the vehicle. 52 | * \public \memberof Vehicle 53 | */ 54 | void vehicleStop(Vehicle *obj); 55 | 56 | 57 | /*! 58 | * Car class. 59 | * \extends Vehicle 60 | */ 61 | struct Car 62 | { 63 | Vehicle base; //!< \protected Base class. 64 | }; 65 | 66 | 67 | /*! 68 | * Truck class. 69 | * \extends Vehicle 70 | */ 71 | struct Truck 72 | { 73 | Vehicle base; //!< \protected Base class. 74 | }; 75 | 76 | 77 | /*! 78 | * Main function. 79 | * 80 | * Ref vehicleStart(), objRef(), objUnref(). 81 | */ 82 | int main(void) 83 | { 84 | Car c; 85 | vehicleStart((Vehicle*) &c); 86 | } 87 | 88 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | // BSD license, modified to remove the organisation as there isn't one. 2 | 3 | Copyright (c) 2009, Michael Jones 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without modification, 7 | are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, 10 | this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | * The names of its contributors may not be used to endorse or promote 15 | products derived from this software without specific prior written 16 | permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /documentation/source/latexmath.rst: -------------------------------------------------------------------------------- 1 | 2 | Latex Math 3 | ========== 4 | 5 | Breathe has basic support for latex math markup in the doxygen comments. A 6 | class with a comment like: 7 | 8 | .. code-block:: cpp 9 | 10 | /** 11 | * @brief A class 12 | * 13 | * A inline formula: \f$ f(x) = a + b \f$ 14 | * 15 | * A display style formula: 16 | * @f[ 17 | * \int_a^b f(x) dx = F(b) - F(a) 18 | * @f] 19 | */ 20 | class MathHelper 21 | { 22 | public: 23 | MathHelper() {} 24 | ~MathHelper() {} 25 | } 26 | 27 | 28 | Will be renderer as: 29 | 30 | .. cpp:namespace:: @ex_latexmath 31 | 32 | .. doxygenclass:: MathHelper 33 | :project: latexmath 34 | :members: 35 | :undoc-members: 36 | 37 | 38 | Without any additional configuration except for including a math extension in 39 | the Sphinx ``conf.py``: 40 | 41 | .. code-block:: python 42 | 43 | extensions = ["breathe", "sphinx.ext.mathjax"] 44 | 45 | The specific environment formula fails when using ``sphinx.ext.pngmath`` so more 46 | work is needed. 47 | 48 | Implementation 49 | -------------- 50 | 51 | Breathe uses a internal reStructuredText node provided by 52 | ``sphinx.ext.mathbase`` which is then picked up and rendered by the extension 53 | chosen in the ``conf.py``. It does not pass any additional options through to 54 | the node, so settings like ``label`` and ``nowrap`` are currently not supported. 55 | 56 | Credits 57 | ------- 58 | 59 | Thank you to `dazzlezhang `_ for providing 60 | examples and a full run down of necessary details. It made the implementation 61 | much easier. 62 | -------------------------------------------------------------------------------- /examples/doxygen/structcmd.h: -------------------------------------------------------------------------------- 1 | /*! \file structcmd.h 2 | \brief A Documented file. 3 | 4 | Details. 5 | */ 6 | 7 | /*! \def MAX_NUMBER(a,b) 8 | \brief A macro that returns the maximum of \a a and \a b. 9 | 10 | Details. 11 | */ 12 | 13 | /*! \var typedef unsigned int UINT32 14 | \brief A type definition for a . 15 | 16 | Details. 17 | */ 18 | 19 | /*! \var int errno 20 | \brief Contains the last error code. 21 | 22 | \warning Not thread safe! 23 | */ 24 | 25 | /*! \fn int open(const char *pathname,int flags) 26 | \brief Opens a file descriptor. 27 | 28 | Detailed description. 29 | 30 | \param pathname The name of the descriptor. 31 | \param flags Opening flags. 32 | */ 33 | 34 | /*! \fn int close(int fd) 35 | \brief Closes the file descriptor \a fd. 36 | \param fd The descriptor to close. 37 | */ 38 | 39 | /*! \fn size_t write(int fd,const char *buf, size_t count) 40 | \brief Writes \a count bytes from \a buf to the file descriptor \a fd. 41 | \param fd The descriptor to write to. 42 | \param buf The data buffer to write. 43 | \param count The number of bytes to write. 44 | */ 45 | 46 | /*! \fn int read(int fd,char *buf,size_t count) 47 | \brief Read bytes from a file descriptor. 48 | \param fd The descriptor to read from. 49 | \param buf The buffer to read into. 50 | \param count The number of bytes to read. 51 | */ 52 | 53 | #define MAX_NUMBER(a,b) (((a)>(b))?(a):(b)) 54 | typedef unsigned int UINT32; 55 | int errno; 56 | int open(const char *,int); 57 | int close(int); 58 | size_t write(int,const char *, size_t); 59 | int read(int,char *,size_t); 60 | -------------------------------------------------------------------------------- /breathe/finder/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from typing import TYPE_CHECKING, Generic, TypeVar 4 | 5 | if TYPE_CHECKING: 6 | from breathe import parser 7 | from breathe.finder.factory import FinderCreatorMap 8 | from breathe.project import ProjectInfo 9 | from breathe.renderer import T_data_object, TaggedNode 10 | from breathe.renderer.filter import DoxFilter, FinderMatch 11 | else: 12 | T_data_object = TypeVar("T_data_object", covariant=True) 13 | 14 | 15 | class ItemFinder(Generic[T_data_object]): 16 | def __init__( 17 | self, 18 | project_info: ProjectInfo, 19 | node: TaggedNode[T_data_object], 20 | finders: FinderCreatorMap, 21 | ): 22 | self.node = node 23 | self.finders: FinderCreatorMap = finders 24 | self.project_info = project_info 25 | 26 | def run_filter( 27 | self, 28 | filter_: DoxFilter, 29 | matches: list[FinderMatch], 30 | node_stack: list[TaggedNode], 31 | item: parser.NodeOrValue, 32 | tag: str | None = None, 33 | ) -> None: 34 | """Adds all nodes which match the filter into the matches list""" 35 | 36 | item_finder = factory.create_item_finder(self.finders, self.project_info, item, tag) 37 | item_finder.filter_(node_stack, filter_, matches) 38 | 39 | def filter_( 40 | self, ancestors: list[TaggedNode], filter_: DoxFilter, matches: list[FinderMatch] 41 | ) -> None: 42 | raise NotImplementedError 43 | 44 | 45 | # ItemFinder needs to be defined before we can import any submodules 46 | from breathe.finder import factory # noqa: E402 47 | -------------------------------------------------------------------------------- /examples/doxygen/qtstyle.cpp: -------------------------------------------------------------------------------- 1 | //! A test class. 2 | /*! 3 | A more elaborate class description. 4 | */ 5 | 6 | class Test12 7 | { 8 | public: 9 | 10 | //! An enum. 11 | /*! More detailed enum description. */ 12 | enum TEnum { 13 | TVal1, /*!< Enum value TVal1. */ 14 | TVal2, /*!< Enum value TVal2. */ 15 | TVal3 /*!< Enum value TVal3. */ 16 | } 17 | //! Enum pointer. 18 | /*! Details. */ 19 | *enumPtr, 20 | //! Enum variable. 21 | /*! Details. */ 22 | enumVar; 23 | 24 | //! A constructor. 25 | /*! 26 | A more elaborate description of the constructor. 27 | */ 28 | Test12(); 29 | 30 | //! A destructor. 31 | /*! 32 | A more elaborate description of the destructor. 33 | */ 34 | ~Test12(); 35 | 36 | //! A normal member taking two arguments and returning an integer value. 37 | /*! 38 | \param a an integer argument. 39 | \param s a constant character pointer. 40 | \return The test results 41 | \sa Test12(), ~Test12(), testMeToo() and publicVar() 42 | */ 43 | int testMe(int a,const char *s); 44 | 45 | //! A pure virtual member. 46 | /*! 47 | \sa testMe() 48 | \param c1 the first argument. 49 | \param c2 the second argument. 50 | */ 51 | virtual void testMeToo(char c1,char c2) = 0; 52 | 53 | //! A public variable. 54 | /*! 55 | Details. 56 | */ 57 | int publicVar; 58 | 59 | //! A function variable. 60 | /*! 61 | Details. 62 | */ 63 | int (*handler)(int a,int b); 64 | }; 65 | 66 | -------------------------------------------------------------------------------- /documentation/source/credits.rst: -------------------------------------------------------------------------------- 1 | 2 | Credits 3 | ======= 4 | 5 | Thank you to: 6 | 7 | - `nijel `_ 8 | - `sebastianschaetz `_ 9 | - `mbolivar `_ 10 | - `queezythegreat `_ 11 | - `abingham `_ 12 | - `davidm `_ 13 | - `hobu `_ 14 | - `magro11 `_ 15 | - `scopatz `_ 16 | - `vitaut `_ 17 | - `vonj `_ 18 | - `jmnas `_ 19 | - `donkopotamus `_ 20 | - `jo3w4rd `_ 21 | - `Anthony Truchet `_ 22 | - `Daniel Matz `_ 23 | - `Andrew Hundt `_ 24 | - `sebastinas `_ 25 | - `robo9k `_ 26 | - `sieben `_ 27 | - `rweickelt `_ 28 | - `sam-roth `_ 29 | - `bnewbold `_ 30 | - `serge-sans-paille `_ 31 | 32 | For their contributions; reporting bugs, suggesting features, improving the code 33 | and working on the documentation. And thanks to: 34 | 35 | - Dimitri van Heesch for `Doxygen `_. 36 | - Georg Brandl for `Sphinx `_. 37 | - David Goodger for `Docutils `_ and reStructuredText. 38 | 39 | And thank you to whoever made the ``haiku`` theme for Sphinx. 40 | -------------------------------------------------------------------------------- /xml_parser_generator/setuptools_builder.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import os.path 4 | 5 | from setuptools.command.build_py import build_py 6 | 7 | try: 8 | from setuptools.modified import newer_group 9 | except ImportError: 10 | from distutils.dep_util import newer_group 11 | 12 | from distutils import log 13 | from distutils.dir_util import mkpath 14 | 15 | import make_parser 16 | 17 | 18 | class CustomBuildPy(build_py): 19 | SCHEMA_FILE = os.path.join("xml_parser_generator", "schema.json") 20 | PY_MODULE_TEMPLATE = os.path.join("xml_parser_generator", "module_template.py.in") 21 | MAKER_SOURCE = os.path.join("xml_parser_generator", "make_parser.py") 22 | PARSER_DEST = os.path.join("breathe", "_parser.py") 23 | 24 | PY_M_DEPENDENCIES = [SCHEMA_FILE, PY_MODULE_TEMPLATE, MAKER_SOURCE] 25 | 26 | def make_parser(self): 27 | dest = self.PARSER_DEST 28 | if not self.editable_mode: 29 | dest = os.path.join(self.build_lib, dest) 30 | mkpath(os.path.dirname(dest), dry_run=self.dry_run) 31 | 32 | if self.force or newer_group(self.PY_M_DEPENDENCIES, dest): 33 | log.info(f'generating "{dest}" source from template') 34 | if not self.dry_run: 35 | make_parser.generate_from_json(self.SCHEMA_FILE, [(self.PY_MODULE_TEMPLATE, dest)]) 36 | else: 37 | log.debug(f'"{dest}" is up-to-date') 38 | 39 | def run(self): 40 | super().run() 41 | self.make_parser() 42 | 43 | 44 | if __name__ == "__main__": 45 | make_parser.generate_from_json( 46 | CustomBuildPy.SCHEMA_FILE, [(CustomBuildPy.PY_MODULE_TEMPLATE, CustomBuildPy.PARSER_DEST)] 47 | ) 48 | -------------------------------------------------------------------------------- /.ruff.toml: -------------------------------------------------------------------------------- 1 | target-version = "py39" # Pin Ruff to Python 3.9 2 | line-length = 100 3 | output-format = "full" 4 | 5 | [format] 6 | preview = true 7 | quote-style = "double" 8 | 9 | [lint] 10 | preview = true 11 | ignore = [ 12 | "UP031", # Use format specifiers instead of percent format 13 | ] 14 | select = [ 15 | "C4", # flake8-comprehensions 16 | # "B", # flake8-bugbear 17 | # "D", # pydocstyle 18 | "E", # pycodestyle 19 | "F", # pyflakes 20 | "FA", # flake8-future-annotations 21 | "FLY", # flynt 22 | "FURB", # refurb 23 | "G", # flake8-logging-format 24 | "I", # isort 25 | "LOG", # flake8-logging 26 | # "N", # pep8-naming 27 | "PERF", # perflint 28 | "PGH", # pygrep-hooks 29 | "PT", # flake8-pytest-style 30 | "TC", # flake8-type-checking 31 | "TID", # flake8-tidy-imports 32 | "UP", # pyupgrade 33 | "W", # pycodestyle 34 | ] 35 | 36 | [lint.per-file-ignores] 37 | "breathe/parser/{compound,index}super.py" = [ 38 | "E266", # Too many leading `#` before block comment 39 | ] 40 | 41 | "examples/doxygen/pyexample.py" = [ 42 | "E266", # Too many leading `#` before block comment 43 | ] 44 | 45 | [lint.flake8-quotes] 46 | inline-quotes = "double" 47 | 48 | [lint.flake8-type-checking] 49 | exempt-modules = [] 50 | strict = true 51 | 52 | [lint.flake8-tidy-imports] 53 | ban-relative-imports = "all" 54 | 55 | [lint.isort] 56 | forced-separate = [ 57 | "tests", 58 | ] 59 | required-imports = [ 60 | "from __future__ import annotations", 61 | ] 62 | 63 | [lint.pydocstyle] 64 | convention = "pep257" 65 | ignore-decorators = ["typing.overload"] 66 | ignore-var-parameters = true 67 | -------------------------------------------------------------------------------- /examples/specific/c_enum.h: -------------------------------------------------------------------------------- 1 | 2 | // Example of a enum in C which has different syntax and different support in Sphinx to the C++ enum 3 | 4 | /** 5 | * Backup data. 6 | * 7 | * \ingroup Backup 8 | */ 9 | typedef enum { 10 | /** 11 | * Compatibility with old gboolean used instead of format. 12 | * 13 | * File type is guessed for extension, non unicode format used 14 | * for Gammu backup. 15 | */ 16 | GSM_Backup_Auto = 0, 17 | /** 18 | * Compatibility with old gboolean used instead of format. 19 | * 20 | * File type is guessed for extension, unicode format used 21 | * for Gammu backup. 22 | */ 23 | GSM_Backup_AutoUnicode = 1, 24 | /** 25 | * LMB format, compatible with Logo manager, can store 26 | * phonebooks and logos. 27 | */ 28 | GSM_Backup_LMB, 29 | /** 30 | * vCalendar standard, can store todo and calendar entries. 31 | */ 32 | GSM_Backup_VCalendar, 33 | /** 34 | * vCard standard, can store phone phonebook entries. 35 | */ 36 | GSM_Backup_VCard, 37 | /** 38 | * LDIF (LDAP Data Interchange Format), can store phone 39 | * phonebook entries. 40 | */ 41 | GSM_Backup_LDIF, 42 | /** 43 | * iCalendar standard, can store todo and calendar entries. 44 | */ 45 | GSM_Backup_ICS, 46 | /** 47 | * Gammu own format can store almost anything from phone. 48 | * 49 | * This is ASCII version of the format, Unicode strings are HEX 50 | * encoded. Use GSM_Backup_GammuUCS2 instead if possible. 51 | */ 52 | GSM_Backup_Gammu, 53 | /** 54 | * Gammu own format can store almost anything from phone. 55 | * 56 | * This is UCS2-BE version of the format. 57 | */ 58 | GSM_Backup_GammuUCS2, 59 | /** 60 | * vNote standard, can store phone notes. 61 | */ 62 | GSM_Backup_VNote, 63 | } GSM_BackupFormat; 64 | -------------------------------------------------------------------------------- /examples/doxygen/jdstyle.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * A test class. A more elaborate class description. 3 | */ 4 | 5 | class Test8 6 | { 7 | public: 8 | 9 | /** 10 | * An enum. 11 | * More detailed enum description. 12 | */ 13 | 14 | enum TEnum { 15 | TVal1, /**< enum value TVal1. */ 16 | TVal2, /**< enum value TVal2. */ 17 | TVal3 /**< enum value TVal3. */ 18 | } 19 | *enumPtr, /**< enum pointer. Details. */ 20 | enumVar; /**< enum variable. Details. */ 21 | 22 | /** 23 | * A constructor. 24 | * A more elaborate description of the constructor. 25 | */ 26 | Test8(); 27 | 28 | /** 29 | * A destructor. 30 | * A more elaborate description of the destructor. 31 | */ 32 | ~Test8(); 33 | 34 | /** 35 | * a normal member taking two arguments and returning an integer value. 36 | * @param a an integer argument. 37 | * @param s a constant character pointer. 38 | * @see Test8() 39 | * @see ~Test8() 40 | * @see testMeToo() 41 | * @see publicVar() 42 | * @return The test results 43 | */ 44 | int testMe(int a,const char *s); 45 | 46 | /** 47 | * A pure virtual member. 48 | * @see testMe() 49 | * @param c1 the first argument. 50 | * @param c2 the second argument. 51 | */ 52 | virtual void testMeToo(char c1,char c2) = 0; 53 | 54 | /** 55 | * a public variable. 56 | * Details. 57 | */ 58 | int publicVar; 59 | 60 | /** 61 | * a function variable. 62 | * Details. 63 | */ 64 | int (*handler)(int a,int b); 65 | }; 66 | 67 | -------------------------------------------------------------------------------- /tests/data/examples/test_c_enum/c_enum.h: -------------------------------------------------------------------------------- 1 | 2 | // Example of a enum in C which has different syntax and different support in Sphinx to the C++ enum 3 | 4 | /** 5 | * Backup data. 6 | * 7 | * \ingroup Backup 8 | */ 9 | typedef enum { 10 | /** 11 | * Compatibility with old gboolean used instead of format. 12 | * 13 | * File type is guessed for extension, non unicode format used 14 | * for Gammu backup. 15 | */ 16 | GSM_Backup_Auto = 0, 17 | /** 18 | * Compatibility with old gboolean used instead of format. 19 | * 20 | * File type is guessed for extension, unicode format used 21 | * for Gammu backup. 22 | */ 23 | GSM_Backup_AutoUnicode = 1, 24 | /** 25 | * LMB format, compatible with Logo manager, can store 26 | * phonebooks and logos. 27 | */ 28 | GSM_Backup_LMB, 29 | /** 30 | * vCalendar standard, can store todo and calendar entries. 31 | */ 32 | GSM_Backup_VCalendar, 33 | /** 34 | * vCard standard, can store phone phonebook entries. 35 | */ 36 | GSM_Backup_VCard, 37 | /** 38 | * LDIF (LDAP Data Interchange Format), can store phone 39 | * phonebook entries. 40 | */ 41 | GSM_Backup_LDIF, 42 | /** 43 | * iCalendar standard, can store todo and calendar entries. 44 | */ 45 | GSM_Backup_ICS, 46 | /** 47 | * Gammu own format can store almost anything from phone. 48 | * 49 | * This is ASCII version of the format, Unicode strings are HEX 50 | * encoded. Use GSM_Backup_GammuUCS2 instead if possible. 51 | */ 52 | GSM_Backup_Gammu, 53 | /** 54 | * Gammu own format can store almost anything from phone. 55 | * 56 | * This is UCS2-BE version of the format. 57 | */ 58 | GSM_Backup_GammuUCS2, 59 | /** 60 | * vNote standard, can store phone notes. 61 | */ 62 | GSM_Backup_VNote, 63 | } GSM_BackupFormat; 64 | -------------------------------------------------------------------------------- /examples/specific/struct.h: -------------------------------------------------------------------------------- 1 | 2 | namespace testnamespace { 3 | 4 | //! \brief first struct inside of namespace 5 | struct NamespacedStructTest { 6 | 7 | 8 | //! \brief namespaced struct function 9 | virtual void function() const = 0; 10 | 11 | static void functionS(); 12 | 13 | explicit NamespacedStructTest() {}; 14 | 15 | //! \brief namespaced struct other function 16 | void anotherFunction() {}; 17 | }; 18 | 19 | 20 | //! \brief second struct inside of namespace 21 | struct StructTest { 22 | 23 | //! \brief second namespaced struct function 24 | void function() {}; 25 | 26 | //! \brief second namespaced struct other function 27 | void anotherFunction() {}; 28 | 29 | //! A public class 30 | class PublicClass {}; 31 | 32 | class UndocumentedPublicClass {}; 33 | }; 34 | 35 | 36 | }; 37 | 38 | 39 | //! \brief struct outside of namespace 40 | struct StructTest { 41 | 42 | //! \brief namespaced class function 43 | virtual void publicFunction() const = 0; 44 | 45 | virtual void undocumentedPublicFunction() const = 0; 46 | 47 | //! A public class 48 | class PublicClass {}; 49 | 50 | class UndocumentedPublicClass {}; 51 | 52 | protected: 53 | 54 | //! A protected function 55 | void protectedFunction() {}; 56 | 57 | void undocumentedProtectedFunction() {}; 58 | 59 | //! A protected class 60 | class ProtectedClass {}; 61 | 62 | class UndocumentedProtectedClass {}; 63 | 64 | private: 65 | 66 | //! This is a private function 67 | virtual void privateFunction() const = 0; 68 | 69 | virtual void undocumentedPrivateFunction() const = 0; 70 | 71 | //! A private class 72 | class PrivateClass {}; 73 | 74 | class UndocumentedPrivateClass {}; 75 | }; 76 | -------------------------------------------------------------------------------- /examples/specific/c_file.h: -------------------------------------------------------------------------------- 1 | /* Borrowed from git "cache-tree.h" as an example of C code */ 2 | 3 | #ifndef CACHE_TREE_H 4 | #define CACHE_TREE_H 5 | 6 | #include "tree.h" 7 | #include "tree-walk.h" 8 | 9 | struct cache_tree; 10 | struct cache_tree_sub { 11 | struct cache_tree *cache_tree; 12 | int namelen; 13 | int used; 14 | char name[FLEX_ARRAY]; 15 | }; 16 | 17 | struct cache_tree { 18 | int entry_count; /* negative means "invalid" */ 19 | unsigned char sha1[20]; 20 | int subtree_nr; 21 | int subtree_alloc; 22 | struct cache_tree_sub **down; 23 | }; 24 | 25 | /** Shared cache tree instance. */ 26 | extern struct cache_tree global_cache_tree; 27 | 28 | struct cache_tree *cache_tree(void); 29 | extern void cache_tree_free(struct cache_tree **); 30 | void cache_tree_invalidate_path(struct cache_tree *, const char *); 31 | struct cache_tree_sub *cache_tree_sub(struct cache_tree *, const char *); 32 | 33 | void cache_tree_write(struct strbuf *, struct cache_tree *root); 34 | struct cache_tree *cache_tree_read(const char *buffer, unsigned long size); 35 | 36 | int cache_tree_fully_valid(struct cache_tree *); 37 | int cache_tree_update(struct cache_tree *, struct cache_entry **, int, int, int); 38 | 39 | /** bitmasks to write_cache_as_tree flags */ 40 | #define WRITE_TREE_MISSING_OK 1 41 | #define WRITE_TREE_IGNORE_CACHE_TREE 2 42 | 43 | /** error return codes */ 44 | #define WRITE_TREE_UNREADABLE_INDEX (-1) 45 | #define WRITE_TREE_UNMERGED_INDEX (-2) 46 | #define WRITE_TREE_PREFIX_ERROR (-3) 47 | 48 | int write_cache_as_tree(unsigned char *sha1, int flags, const char *prefix); 49 | void prime_cache_tree(struct cache_tree **, struct tree *); 50 | 51 | extern int cache_tree_matches_traversal(struct cache_tree *, struct name_entry *ent, struct traverse_info *info); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /tests/data/examples/test_c_file/c_file.h: -------------------------------------------------------------------------------- 1 | /* Borrowed from git "cache-tree.h" as an example of C code */ 2 | 3 | #ifndef CACHE_TREE_H 4 | #define CACHE_TREE_H 5 | 6 | #include "tree.h" 7 | #include "tree-walk.h" 8 | 9 | struct cache_tree; 10 | struct cache_tree_sub { 11 | struct cache_tree *cache_tree; 12 | int namelen; 13 | int used; 14 | char name[FLEX_ARRAY]; 15 | }; 16 | 17 | struct cache_tree { 18 | int entry_count; /* negative means "invalid" */ 19 | unsigned char sha1[20]; 20 | int subtree_nr; 21 | int subtree_alloc; 22 | struct cache_tree_sub **down; 23 | }; 24 | 25 | /** Shared cache tree instance. */ 26 | extern struct cache_tree global_cache_tree; 27 | 28 | struct cache_tree *cache_tree(void); 29 | extern void cache_tree_free(struct cache_tree **); 30 | void cache_tree_invalidate_path(struct cache_tree *, const char *); 31 | struct cache_tree_sub *cache_tree_sub(struct cache_tree *, const char *); 32 | 33 | void cache_tree_write(struct strbuf *, struct cache_tree *root); 34 | struct cache_tree *cache_tree_read(const char *buffer, unsigned long size); 35 | 36 | int cache_tree_fully_valid(struct cache_tree *); 37 | int cache_tree_update(struct cache_tree *, struct cache_entry **, int, int, int); 38 | 39 | /** bitmasks to write_cache_as_tree flags */ 40 | #define WRITE_TREE_MISSING_OK 1 41 | #define WRITE_TREE_IGNORE_CACHE_TREE 2 42 | 43 | /** error return codes */ 44 | #define WRITE_TREE_UNREADABLE_INDEX (-1) 45 | #define WRITE_TREE_UNMERGED_INDEX (-2) 46 | #define WRITE_TREE_PREFIX_ERROR (-3) 47 | 48 | int write_cache_as_tree(unsigned char *sha1, int flags, const char *prefix); 49 | void prime_cache_tree(struct cache_tree **, struct tree *); 50 | 51 | extern int cache_tree_matches_traversal(struct cache_tree *, struct name_entry *ent, struct traverse_info *info); 52 | 53 | #endif 54 | --------------------------------------------------------------------------------