doxygen cheatsheet.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. READ THIS, OFTEN OVERLOOKED:
  2. To document global objects (functions, enums, typedefs, ...) there must be a
  3. /** @file */ documenting comment in the file.
  4. For Python, turn OPTIMIZE_OUTPUT_JAVA to YES.
  5. CLI:
  6. doxygen -g generate default Doxyfile
  7. doxygen generate the documentation from the present Doxyfile
  8. DOXYFILE:
  9. PROJECT_NAME name of the project
  10. PROJECT_BRIEF brief summary of the project
  11. PROJECT_LOGO project logo file, should fiut into 55 x 200 pixels
  12. INPUT input source files and/or folders, separate with spaces
  13. RECURSIVE traverse the source directories recursively? (YES or NO)
  14. OUTPUT_DIRECTORY folder to save the documentation to
  15. EXTRACT_ALL document everything, even private and undocumented stuff (YES or NO)
  16. CLASS_DIAGRAMS generate class diagrams? (YES by default)
  17. CLASS_GRAPH generate class graphs? better than CLASS_DIAGRAMS (YES by default, YES overrides CLASS_DIAGRAMS)
  18. SOURCE COMMENTS:
  19. C-like:
  20. /** @file This documents a file. This has to be there in order for global
  21. elements (functions, typdefes, enums, ...) to be documented. */
  22. /**
  23. @brief Brief doc for myClass.
  24. Detailed doc for myClass.
  25. */
  26. class myClass
  27. {
  28. /// 3 '/'s for a one-line comment (BEFORE an element), or alternatively "//!"
  29. int myMember;
  30. int myMember2; ///< comment AFTER an element has an additional '<'
  31. int myMember3; /**< or like this */
  32. /**
  33. Doc for myMethod.
  34. @param a Doc for parameter a.
  35. @param b Doc for parameter b.
  36. @return Doc for return value.
  37. */
  38. int myMethod(int a, int b);
  39. };
  40. Python:
  41. ## @package mypackage
  42. # Brief doc for mypackage.
  43. ## Brief doc for MyClass.
  44. #
  45. # Detailed doc for MyClass.
  46. class MyClass:
  47. ## Doc for myMember (doc AFTER the element is NOT supported).
  48. myMember = 0
  49. ## Doc for myFunc
  50. #
  51. # @param a Doc for parameter a.
  52. # @param b Doc for parameter b.
  53. # @return Doc for return value.
  54. def myFunc(a, b):
  55. pass