【发布时间】:2013-04-03 11:52:00
【问题描述】:
我曾经把简单的 cmets 写到我的头文件中
// Returns a new string in which all occurrences of a specified string in the
// current instance are replaced with another specified string.
// - strSubject: The string to perform the replacement on.
// - strOldValue: The string to be replaced.
// - strNewValue: The string to replace all occurrences of strOldValue.
static RUNTIME_API String::type Replace
(_In_ String::type strSubject,
_In_ const String::type& strOldValue,
_In_ const String::type& strNewValue);
这样 Visual Assist 就会准确地向我显示这条评论:
目前我正在考虑使用 Doxygen 为项目创建文档,但是我正在努力寻找在工具提示中正确显示并且可以使用 Doxygen 解析的文档样式。首先,我正在考虑在 *.cpp 文件中包含 Doxygen 样式的 cmets,以便我只显示标题 cmets。因此,在我的源文件中,我有一个类似
的评论/*!
* Returns a new string in which all occurrences of a specified string in the
* current instance are replaced with another specified string.
*
* \param strSubject The string to perform the replacement on.
* \param strOldValue The string to be replaced.
* \param strNewValue The string to replace all occurrences of strOldValue.
*
* \return A string that is equivalent to the current string except that all
* instances of strOldValue are replaced with strNewValue. If
* strOldValue is not found in the current instance, the method returns
* the current instance unchanged.
*/
String::type String::Replace
(_In_ String::type strSubject,
_In_ const String::type& strOldValue,
_In_ const String::type& strNewValue) { /* ... */ }
令人惊讶的是,当悬停此功能或获得视觉辅助“IntelliSense”时,我得到了两个不同的输出。悬停Replace 产生
当提到的 IntelliSense 产生时
但是将 Doxygen 样式的注释移到标题中会产生奇怪的结果
我想知道您是否有建议如何使用 Qt 样式的 doxygen cmets,但让 IntelliSense 显示适当的工具提示(无论它可能是什么),而不是根据我调用它的方式显示不同的工具提示? 必须有一种方法来统一这一点。(或者,我必须像往常一样工作并创建仅由 doxygen cmets 组成的单独的文档标题 - 这样我不会有问题,但会冗余数据)
【问题讨论】:
-
我已经向 Whole Tomato 提交了关于我看到的类似问题的支持请求,他们说他们可以重现并提交错误。不知道什么时候会解决这个问题。我用 VS 2013 试用了当前最新版本的 Visual Assist。
标签: c++ visual-studio-2012 intellisense doxygen visual-assist