我正在使用此方法来记录我的方法:
/**
* 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);
}
当我检查输出文件时,我得到的格式如下:
Order beers from another player and add them into own inventory. from The Player who has to deliver the order
这看起来非常无组织。参数之间没有分隔。我该如何解决?
最佳答案
doxygen到ducument参数是\param
而不是\ params (so without
s)。
参见:http://doxygen.nl/manual/commands.html#cmdparam,摘录:
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.
关于c++ - 在Doxygen中格式化参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60673241/