源代码美化c ++(vc ++)? [英] Source code beautifier for c++ (vc++)?

查看:120
本文介绍了源代码美化c ++(vc ++)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个250个头文件和我的项目的cpp文件。我想格式化旧代码并生成API文档。有什么工具可以帮助我做到这一点吗?



我正在考虑使用DOxygen,但我相信需要某种格式的信息。

解决方案

请使用 Doxygen 构建文档。它可以通过正确的设置从源中推断出很多。对于每个已记录的对象,它会变得更好。但是,Doxygen不会帮助您规范代码的格式和布局。



对于该任务,您需要一个代码美化工具。经典工具是 indent 。然而,一个更通用的工具是 Uncrustify ,这是明确命名的通用缩进GUI 。后一种工具支持各种语言,并提供了一个很好的GUI界面,可以帮助您将设置调整为首选样式。



以上所有内容都是免费的,开放的来源,顺便说一下。



一旦你使用Doxygen,你也想安装 Graphviz 工具,以便它可以绘制您调用图和其他图。


I have a set of 250 header files and cpp files of my project. I wanted to format the old code and generate API documentation. Is there any tool that can help me do this?

I am thinking of using DOxygen, but I believe that needs the information in a some format.

解决方案

Do use Doxygen for building documentation. It can infer a lot from the source as-is with the right settings. It gets better with suitable comments for each documented object. However, Doxygen won't help you regularize your code's format and layout.

For that task, you want a code beautifier. The classic tool was indent. However, a much more versatile tool is Uncrustify, which is one of several beautifiers included in the clearly named Universal Indent GUI. The latter tool supports a wide array of languages, and provides a nice GUI interface to help you tune the settings to your preferred style.

All of the above are free and open source, incidentally.

Once you get into using Doxygen, you will want to also install the Graphviz tools so that it can draw you call graphs and other diagrams.

这篇关于源代码美化c ++(vc ++)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆