Doxygen:如何在一行中描述多个参数?

Doxygen: how to describe multiple parameters in one line?

我有一些函数有很多参数,有时这些参数在本质上非常相似,例如,当将颜色传递给函数时,我有参数“R G B”,我想知道它是否是可以在 doxygen 中将它们记录在一起。我现在为此做了一些相当广泛的事情:

    /// @param x      Initial cursor position at X axis.
    /// @param y      Initial cursor position at Y axis. 
    /// @param r      Text amount of red color (default: 1.f)
    /// @param g      Text amount of green color (default: 1.f)
    /// @param b      Text amount of blue color (default: 1.f)

我想知道是否可以统一相同性质的参数,例如,有没有办法可以做类似的事情?:

    /// @param x y :   Initial cursor position.
    /// @param r g b : Text color (default: white)

你会推荐什么?

我在 \param 命令的文档中指出:

\param '['dir']' { parameter description } 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. Here is an example for the function memcpy:

/*!
* Copies bytes from a source memory area to a destination memory area,
* where both areas may not overlap.
* @param[out] dest The memory area to copy to.
* @param[in] src The memory area to copy from.
* @param[in] n The number of bytes to copy
*/ void memcpy(void *dest, const void *src, size_t n);

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. See section \fn for an example. Note that you can also document multiple parameters with a single \param command using a comma separated list. Here is an example:

/** Sets the position.
 * @param x,y,z Coordinates of the position in 3D space.
 */
void setPosition(double x,double y,double z,double t) { }

Note that for PHP one can also specify the type (or types if you separate them with a pipe symbol) which are allowed for a parameter (as this is not part of the definition). The syntax is the same as for the phpDocumentor, i.e. @param datatype1|datatype2 $paramname description

所以在这种情况下:

/// @param x,y   Initial cursor position.
/// @param r,g,b Text amount of red, green, blue color (default: 1.f i.e. white)