doxygenfile Directive Example¶
Example¶
This should work:
.. doxygenfile:: nutshell.h
:project: nutshell
It produces this output:
An overly extended example of how to use breathe.
class Nutshell
With a little bit of a elaboration, should you feel it necessary.
Public TypePublic FunctionsTool enum
Our toolset.
The various tools we can opt to use to crack this particular nut
Values:
- kHammer = = 0 -
What? It does the job.
- kNutCrackers -
Boring.
- kNinjaThrowingStars -
Stealthy.
Private Membersbool m_isCracked
Our cracked state.
Example with Nested Namespaces¶
This should work:
.. doxygenfile:: namespacefile.h
:project: namespacefile
It produces this output:
namespace foo
Functionsint baz()This also appears.
class Bar
This appears in the documentation.
class InnerBar
This appears as a sub class.
namespace ns
More examples in a nested namespace.
TypedefsEnumstypedef int MyInt
Letters enum
Values:
- A -
- B -
- C -
class FooStruct
Documentation here.
class FooClass
class InnerFoo
Example for Multiple Files¶
When there are multiple files with the same name in the project, you need to be more specific with the filename you provide. For example, in a project with the following two files:
/some/long/project/path/parser/Util.h
/some/long/project/path/finder/Util.h
You should specify:
.. doxygenfile:: parser/Util.h
.. doxygenfile:: finder/Util.h
To uniquely identify them.
Failing Example¶
This intentionally fails:
.. doxygenfile:: made_up_file.h
:project: nutshell
It produces the following warning message:
Warning
Cannot find file “made_up_file.h” in doxygen xml output for project “nutshell” from directory: ../examples/specific/nutshell/xml/