简体   繁体   English

用于C ++代码可视化的Python模块

[英]Python modules for visualization of C++ code

I'm looking for python modules that can help with grepping C++ code. 我正在寻找可以帮助grepping C ++代码的python模块。 I have a large code base that I would like to do some analysis on. 我有一个很大的代码库,我想对其进行一些分析。 Ultimately I would like to come up with a graphical map of the software. 最终,我想拿出该软件的图形化地图。 There is lots of message passing going on amongst apps so I would like to be able to capture that information and present it visually. 应用之间有很多消息传递,因此我希望能够捕获这些信息并以可视方式呈现。 I have been looking around at some of the data visualization packages but have only stumbled on math and plotting related ones. 我一直在寻找一些数据可视化程序包,但只是偶然发现了数学并绘制了相关的程序包。

What are the best tools for this job, preferably in python? 什么是最好的工具来完成这项工作,最好是在python中?

Your best tool for the job is Graphviz. 最好的工具是Graphviz。 If you look at their gallery you'll find the sort of thing that you're interested in along with links to projects. 如果您查看他们的画廊 ,就会发现您感兴趣的东西以及指向项目的链接。

Under the language bindings section here there are a few python entries. 在“语言绑定”部分下, 这里有一些python条目。 Personally I don't use them as the dot language format is simple enough that you can build up fairly complex graphs from Python just using print statements. 我个人不使用它们,因为点语言格式非常简单,您仅使用打印语句就可以从Python建立相当复杂的图形。

You ca look at doxygen and see if it does (at least some part of) what you want. 您可以看一下氧气 ,看看它是否确实(至少是一部分)您想要的。 It generates call graph and class diagrams directly in html or xml format (I believe you need to have dot installed for fancy graphs). 它直接以html或xml格式生成调用图和类图(我相信您需要为精美的图安装 )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM