简体   繁体   English

类图的C ++代码

[英]C++ code to class diagram

Is there is a way I can generate a hierachial class diagram from C++ code. 有没有办法可以从C ++代码生成层次类图。 My code is spread over 5 to 6 .cpp files. 我的代码分布在5到6个.cpp文件中。

I would like to know if there is any free tool for the same. 我想知道是否有任何免费工具。

Regards, AJ 问候,AJ

There's eg doxygen 有例如doxygen

http://www.doxygen.nl/manual/features.html says: http://www.doxygen.nl/manual/features.html说:

Uses the dot tool of the Graphviz tool kit to generate include dependency graphs, collaboration diagrams, call graphs, directory structure graphs, and graphical class hierarchy graphs. 使用Graphviz工具包的点工具生成包含依赖关系图,协作图,调用图,目录结构图和图形类层次结构图。

It creates graphs like 它会创建图表


(from http://www.vtk.org/doc/nightly/html/structvtkKdTree_1_1__cellList.html , an example listed on the doxygen site) (来自http://www.vtk.org/doc/nightly/html/structvtkKdTree_1_1__cellList.html,doxygen网站上列出的示例)

Since the question was about class diagrams you might also be interested in the UML_LOOK flag that makes the ouput a bit more uml-like. 由于问题是关于类图,你可能也对UML_LOOK标志感兴趣,这使得输出更像uml。

Class diagrams are networks, not hierarchies. 类图是网络,而不是层次结构。 There a re quite a few tools that can generate them - my favourite is Enterprise Architect , but it isn't free (there is a trial). 有很多工具可以生成它们 - 我最喜欢的是Enterprise Architect ,但它不是免费的(有一个试用版)。

Umberello是从代码生成图表的Linux应用程序。

Doxygen can create class-diagrams . Doxygen可以创建类图 However, I believe these diagrams are only to show the network of classes, they do not list methods and members and such. 但是,我相信这些图只是为了显示类的网络,它们不列出方法和成员等。

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

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