Breathe 1.2.0 documentation

doxygenfile Directive Example

«  doxygenvariable Directive Example   ::   Contents   ::   Supported Markups  »

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 Type

Tool 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.

Public Functions

Nutshell()

Nutshell constructor.

~Nutshell()

Nutshell destructor.

void crack(Tool tool)

Crack that shell with specified tool

Parameters
  • tool -

    - the tool with which to crack the nut

bool isCracked()

Return
Whether or not the nut is cracked

Private Members

bool m_isCracked

Our cracked state.

Example with Nested Namespaces

This should work:

.. doxygenfile:: namespacefile.h
   :project: namespacefile

It produces this output:


namespace foo

Functions

int 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.

Typedefs

typedef int MyInt

Enums

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/

«  doxygenvariable Directive Example   ::   Contents   ::   Supported Markups  »