Doxygen 中的关键字,它将显示当前正在使用功能的实体
A keyword in Doxygen, which will show which entities currently using function
我正在用 doxygen 记录我的函数。一个例子:
//! Add the variable to String Hash Map
/*!
Given name of the string, a new the item with this name will be add. This function is being used from GUI when user adds a constant.
\param variableName The name of the variable which will be added
*/
void addVariableToStrMap(const QString& variableName);
对于几乎每个函数,我都写了类似的东西:This function is being used from GUI class when user adds a constant
。我这样写的一般方式; "this function is being used in function foo
of class A
and function foo2
of class B
"
doxygen 中是否有像 "who or when or usage" 这样的关键字可以用于这种情况?
在 Doxyfile 中,您会找到选项 REFERENCED_BY_RELATION
和 REFERENCES_RELATION
。如果将它们设置为 YES,那么您将获得一个以逗号分隔的函数列表,这些函数引用了文档中的函数,以及一个以逗号分隔的函数列表,这些函数被文档中的函数引用了。
您可能会对进一步创建自定义命令感兴趣(请参阅 http://www.doxygen.nl/manual/custcmd.html)。您可以通过在 Doxyfile 中添加带有参数的别名来创建自定义命令,例如:
ALIASES += who{1}="This function is being used from class"
那你可以在评论里写:
\who{GUI}
这会在您的文档中生成句子 "This function is being used from GUI class"。
我正在用 doxygen 记录我的函数。一个例子:
//! Add the variable to String Hash Map
/*!
Given name of the string, a new the item with this name will be add. This function is being used from GUI when user adds a constant.
\param variableName The name of the variable which will be added
*/
void addVariableToStrMap(const QString& variableName);
对于几乎每个函数,我都写了类似的东西:This function is being used from GUI class when user adds a constant
。我这样写的一般方式; "this function is being used in function foo
of class A
and function foo2
of class B
"
doxygen 中是否有像 "who or when or usage" 这样的关键字可以用于这种情况?
在 Doxyfile 中,您会找到选项 REFERENCED_BY_RELATION
和 REFERENCES_RELATION
。如果将它们设置为 YES,那么您将获得一个以逗号分隔的函数列表,这些函数引用了文档中的函数,以及一个以逗号分隔的函数列表,这些函数被文档中的函数引用了。
您可能会对进一步创建自定义命令感兴趣(请参阅 http://www.doxygen.nl/manual/custcmd.html)。您可以通过在 Doxyfile 中添加带有参数的别名来创建自定义命令,例如:
ALIASES += who{1}="This function is being used from class"
那你可以在评论里写:
\who{GUI}
这会在您的文档中生成句子 "This function is being used from GUI class"。