doxygenclass Directive Example¶
Example without Members¶
This should work:
.. doxygenclass:: Nutshell
:project: nutshell
It produces this output:
- class Nutshell
With a little bit of a elaboration, should you feel it necessary.
Example with Members¶
This should work:
.. doxygenclass:: Nutshell
:project: nutshell
:members:
It produces this output:
- class Nutshell
With a little bit of a elaboration, should you feel it necessary.
- Public Type
- Tool enum
Our tool set.
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.
- kHammer = = 0 -
- 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
- tool -
- bool isCracked()
- Return
- Whether or not the nut is cracked
Working Example with Specific Members¶
This should work:
.. doxygenclass:: Nutshell
:project: nutshell
:members: crack, isCracked
It produces this output:
- class Nutshell
With a little bit of a elaboration, should you feel it necessary.
- Public Functions
- void crack(Tool tool)
Crack that shell with specified tool
- Parameters
- tool -
- the tool with which to crack the nut
- tool -
- bool isCracked()
- Return
- Whether or not the nut is cracked
Example as Outline¶
This should work:
.. doxygenclass:: Nutshell
:project: nutshell
:outline:
:members:
It produces this output:
- class Nutshell
- Public Type
- Tool enum
Values:
- kHammer = = 0 -
- kNutCrackers -
- kNinjaThrowingStars -
- Public Functions
- Nutshell()
- ~Nutshell()
- void crack(Tool tool)
- bool isCracked()
Failing Example¶
This intentionally fails:
.. doxygenclass:: made_up_class
:project: class
:members:
It produces the following warning message:
Warning
doxygenclass: Cannot find class “made_up_class” in doxygen xml output