有没有类似 GhostDoc for C++ 的东西?

发布于 2024-07-13 14:44:50 字数 236 浏览 4 评论 0原文

当我使用 C# 进行开发时,我大量使用 GhostDoc 来加快代码注释的过程。 我目前正在开发一个 C++ 项目,但尚未找到等效的工具。 我了解 Doxygen,但据我所知,它用于在代码外创建文档,而不是在代码中创建注释。 有没有好的等效工具? 我更喜欢在 VS 中运行的一个,但我可以处理在任何 IDE 中运行的一个。

(在有人提出之前,我并不完全依赖 GhostDoc 来创建评论。我只是用它来创建我的评论的起点。)

When I'm developing in C#, I heavily use GhostDoc to speed up the process of commenting my code. I'm currently working on a C++ project and I haven't found an equivalent tool. I know about Doxygen, but from what I know it is used to create documentation outside the code, not comments in the code. Are there any good equivalent tools? I would prefer one that runs in VS, but I could handle one that works in any IDE.

(Before someone brings it up, I don't rely solely on GhostDoc to create comments. I just use it to create the starting point for my comments.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

时光沙漏 2024-07-20 14:44:50

我写了一个插件,Atomineer Pro Documentation,它非常有用与 GhostDoc 类似(它生成/更新文档注释以在记录时节省大量时间和精力),但它直接为自己解析代码,因此能够处理 C、C++、C++/CLI、C#、Java 和 Visual Basic代码,并且不需要周围的代码在运行之前处于编译状态。 它还会自动添加/更新更棘手的事情的文档,例如方法体内抛出的异常。

它在 Visual Studio 11、2010、2008 和 2005 下运行,支持 Documentation-Xml、Doxygen、JavaDoc 和 Qt 注释格式,以及注释块的格式/样式和高度可配置的自动文档规则。 它还有许多其他方便的功能,例如帮助将遗留文档注释转换为上述格式,以及文档注释和普通块注释中的自动换行。

以上只是一些关键功能的总结 - 与其他产品的功能比较可以作为许多其他可用功能的更完整列表。

I've written an add-in, Atomineer Pro Documentation, which is very similar to GhostDoc (it generates/updates documentation comments to save a lot of time and effort when documenting), but it parses the code directly for itself and thus is able to handle C, C++, C++/CLI, C#, Java and Visual Basic code, and doesn't require the surrounding code to be in a compiling state before it will work. It will also automatically add/update documentation for more tricky things such as exceptions thrown within the body of a method.

It runs under Visual Studio 11, 2010, 2008 and 2005, and supports Documentation-Xml, Doxygen, JavaDoc and Qt commenting formats, as well as the format/style of comment blocks and the auto-doc rules used being highly configurable. It has a number of other handy features such as aiding conversions of legacy doc-comments to the above formats, and word wrapping in doc-comments and normal block comments.

The above is just a summary of some key features - This comparison of features with other products serves as a more complete list of the many other features available.

做个少女永远怀春 2024-07-20 14:44:50

Visual Assist 通过提供在键入(或其他)时执行的自定义脚本来提供帮助。

例如,您可以有一个这样的注释脚本:

/************************************************************************/
/* My comment : $end$                                                                     */
/************************************************************************/

例如,当您开始输入“/**”时,会建议(通过与智能感知完全相同的组合框)。
当您选择此建议(通过 Enter/空格/单击 - 可自定义)时,它将在光标所在位置插入脚本,并仅将“$”字符之间的标记替换为特殊值(例如当前文件名)。
这里的 $end$ 标记将使脚本执行时光标位于该位置。 这样,您就可以继续顺利地打字。 例如,对于前面的脚本集,准确输入 :

/** this is a test comment to show you one of the many features Visual Assit!

将简单地给出 :

/************************************************************************/
/* My comment : this is a test comment to show you one of the many features Visual Assit!                                                                     */
/************************************************************************/

定制非常容易,并且建议(阅读:intellisense++)系统的行为是可定制的。

Visual Assist helps by providing custom scripts executed while typing (or on other).

For example, you can have a script for comments like this :

/************************************************************************/
/* My comment : $end$                                                                     */
/************************************************************************/

That would be suggested (via a combo-box exactly like intellisense) when you start typing "/**" for example.
When you select this suggestion (via Enter/Space/Click - customizable), it will insert the script where your cursor is and just replace markers that are between '$' characters by special values (like the current file name for example).
Here the $end$ marker will make the cursor be at this position when the script is executed. This way, you continue typing smoothly. For example with the previous script set, typing exactly :

/** this is a test comment to show you one of the many features Visual Assit!

will simply give :

/************************************************************************/
/* My comment : this is a test comment to show you one of the many features Visual Assit!                                                                     */
/************************************************************************/

It's really easy to customize and the behavior of the suggestion (read : intellisense++) system is customizable.

蓝眼睛不忧郁 2024-07-20 14:44:50

Visual Assist 可能可以完成这项工作,尽管我不太确定。

Visual Assist might do the job, though I'm not absolutely sure.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文