

classes, functions, etc.) there is not much point in doing so because, as described in the previous sections, Doxygen automatically creates links to source code entities if you follow certain rules how to write the entity names. The command is used to create links to almost any documented element within a Doxygen project.Īlthough you could use to create links to source code entities (e.g. / - #duplicateFunction() -> member function / - ::duplicateFunction() -> global function / - duplicateFunction() -> member function / A link to a global function or a member function of the same name / A link to a value of an in-class enumeration of the same class / A link to an in-class enumeration of the same class / A link to a member function of the same class / A link to a member variable of the same class / We are documenting a class, therefore we are now in a class context / - ToplevelNamespace::namespaceCounter / A link to a value of an in-class enumeration / A link to a value of a global enumeration / A link to a member function of a class / A link to a member variable of a class / We are documenting a file, therefore we are now in the global context

How the generated documentation should look like.The 2 lines should be simple comments using 2 slashes ("//") to prevent Doxygen from parsing them. To visually separate comment blocks from the surrounding code, I like to add a starting and an end line to the comment block. This technique won't work if the source code that I want to disable contains Doxygen comment blocks marked up with /* */. I don't like that because it interferes with one of my frequently used coding techniques where I quickly disable large parts of source code by surrounding the code with /* */. The other comment block markup styles build on the C-style multi-line comment /* */.

/ previous empty line begins a new block Several consecutive lines that all start with "///" together form a comment block: There are several markup styles, but my personal favourite is to begin each line with 3 slashes ("///"). files), these are presented later in this document.ĭoxygen only processes comment blocks that are specially marked up. Constructors, Desctructors, methods, operators, global functionsĭoxygen can generate documentation for additional entitities (e.g.Pretty much all C++ language elements can be documented: 9.1 9.2 9.3 10 Doxyfile configurationĬ++ language elements that can be documented.8.3 Variables, typedefs, enumerations, preprocessor macros, namespaces.4.5 Special case 5 The most important commands.4.4 Documentation separated from element.4.3 Documentation at the place of definition instead of declaration.4.1 Documentation before the element (default).3.2 Visual separation of comment blocks.2 C++ language elements that can be documented.
