1

I am using this method to document my methods:

/**
* Order beers from another player and add them into own inventory.
* @params from The Player who has to deliver the order
*/

void Player::order(const int numberOfBeers, Player &from)
{
    from.decreaseInventory(numberOfBeers);
    increaseInventory(numberOfBeers);
}

When I check my output files, I just get this in such a format:

Order beers from another player and add them into own inventory. from The Player who has to deliver the order 

This looks very unstructured. There's no separation for parameters. How could I fix this?

1 Answers1

1

The doxygen to ducument parameters is \param not \params(so withouts`).

See: http://doxygen.nl/manual/commands.html#cmdparam, excerpts:

Starts a parameter description for a function parameter with name , followed by a description of the parameter. The existence of the parameter is checked and a warning is given if the documentation of this (or any other) parameter is missing or not present in the function declaration or definition.

The \param command has an optional attribute, dir, specifying the direction of the parameter. Possible values are "[in]", "[in,out]", and "[out]", note the [square] brackets in this description. When a parameter is both input and output, [in,out] is used as attribute.

The parameter description is a paragraph with no special internal structure. All visual enhancement commands may be used inside the paragraph.

Multiple adjacent \param commands will be joined into a single paragraph. Each parameter description will start on a new line. The \param description ends when a blank line or some other sectioning command is encountered.

Community
  • 1
  • 1
albert
  • 8,285
  • 3
  • 19
  • 32