Domains#
Breathe has some limited support for Sphinx domains. It tries to output targets
that the Sphinx domain references expect. This should allow you to use Sphinx
domain roles like :c:func:`foo`
to link to output from Breathe.
The following targets are supported:
C & C++ functions
C++ classes
Class Example#
Given the following Breathe directives:
.. doxygenclass:: TestNamespaceClasses::NamespacedClassTest
:path: ../../examples/specific/class/xml
Which create formatted output like:
- class NamespacedClassTest#
first class inside of namespace
We can refer to NamespacedClassTest using:
:cpp:class:`TestNamespaceClasses::NamespacedClassTest`
which renders as TestNamespaceClasses::NamespacedClassTest
, or using:
:cpp:class:`another reference <TestNamespaceClasses::NamespacedClassTest>`
which renders as: another reference
.
Inner Class Example#
Given the following Breathe directive:
.. doxygenclass:: OuterClass
:path: ../../examples/specific/class/xml
:members:
Which create formatted output like:
We can refer to OuterClass::InnerClass using:
:cpp:class:`OuterClass::InnerClass`
which renders as OuterClass::InnerClass
.
Function Examples#
Given the following Breathe directives:
.. doxygenfunction:: TestNamespaceClasses::NamespacedClassTest::function
:path: ../../examples/specific/class/xml
.. doxygenfunction:: frob_foos
:path: ../../examples/specific/alias/xml
Which create formatted output like:
We can refer to namespaceFunc using:
:cpp:func:`TestNamespaceFunction::namespaceFunc()`
which renders as TestNamespaceFunction::namespaceFunc()
, or using:
:cpp:func:`another reference <namespaceFunc()>`
which renders as: another reference
.
Note the use of the cpp domain.
And we can refer to frob_foos using:
:c:func:`frob_foos()`
which renders as: frob_foos()
, or using:
:c:func:`another reference <frob_foos()>`
which renders as: another reference
. Note the use of the c domain.
Typedef Examples#
Given the following Breathe directives:
.. doxygentypedef:: TestTypedef
:path: ../../examples/specific/typedef/xml
.. doxygennamespace:: TypeDefNamespace
:path: ../../examples/specific/typedef/xml
.. doxygenclass:: TestClass
:path: ../../examples/specific/typedef/xml
:members:
which create formatted output like:
We can refer to TestTypedef using:
:cpp:type:`TestTypedef`
which renders as TestTypedef
, to TypeDefNamespace::AnotherTypedef using:
:cpp:type:`TypeDefNamespace::AnotherTypedef`
which renders as TypeDefNamespace::AnotherTypedef
and to TestClass::MemberTypedef using:
:cpp:type:`TestClass::MemberTypedef`
which renders as TestClass::MemberTypedef
.
Enum Value Examples#
Given the following Breathe directives:
.. doxygenenumvalue:: VALUE
:path: ../../examples/specific/enum/xml
.. doxygenenumvalue:: TestEnumNamespace::FIRST
:path: ../../examples/specific/enum/xml
Which create formatted output like:
We can refer to VALUE using:
:cpp:enumerator:`VALUE`
which renders as VALUE
and to TestEnumNamespace::FIRST using:
:cpp:enumerator:`TestEnumNamespace::FIRST`
which renders as TestEnumNamespace::FIRST
.