7

In non-Doxygen comments, I often have:

/* Lorem ipsum etc.
 *
 * Notes:
 * - A first note.
 * - Some other note note.
 */

But with Doxygen, I have @note (or \note), not @notes). So, should I use multiple @notes, or do I put all notes under the same @note?

einpoklum
  • 118,144
  • 57
  • 340
  • 684

2 Answers2

4

The @note command results in a paragraph which format can be customized in the CSS file or in the style file when using Latex. So you can just use the markups like in a "normal" text:

/**
 * Bla bla...
 *
 * @note Even in a note you can use markups:
 *       - Your first note
 *       - Youre second note
 *
 * The note section ends with an empty line or the end of the comment.
 */
gmug
  • 773
  • 5
  • 11
2

You can do it either way; it's really a question of style/preference.

As you pointed out, Doxygen has the @note command, but not @notes. You can create your own command for @notes by editing the Doxyfile, and modifying the ALIASES = tag to read

ALIASES = "notes=@par Notes:\n"

With this, you can put the command @notes in the documentation, which will result in a user-defined paragraph with the heading

Notes:

As pointed out in the Doxygen documentation for the ALIAS tag, you can put \n's in the value part of an alias to insert newlines.

albert
  • 8,285
  • 3
  • 19
  • 32
sifferman
  • 2,955
  • 2
  • 27
  • 37