我有这么大的C文件收集给我,这样一个工具将是无价的帮助我
了解源代码.我有点纠结了解它.
您可能需要GraphViz生成图形.有a simple example和output.
这是由doxgen生成的图例文件中的一个更复杂的例子:
代码(注意:如果只想生成图形,则不需要注释.):
/*! Invisible class because of truncation */class Invisible { };/*! Truncated class,inheritance relation is hIDden */class Truncated : public Invisible { };/* Class not documented with doxygen comments */class Undocumented { };/*! Class that is inherited using public inheritance */class PublicBase : public Truncated { };/*! A template class */template<class T> class Templ { };/*! Class that is inherited using protected inheritance */class ProtectedBase { };/*! Class that is inherited using private inheritance */class PrivateBase { };/*! Class that is used by the inherited class */class Used { };/*! Super class that inherits a number of other classes */class inherited : public PublicBase,protected ProtectedBase,private PrivateBase,public Undocumented,public Templ<int>{ private: Used *m_usedClass;};
结果:
您不需要对代码进行评论来生成这些图形.第一个例子根本没有任何意见.第二个例子有一个没有Doxygen风格评论的类.只需设置相应的参数(至少应该设置EXTRACT_ALL = YES),我不记得是否需要这样做).
总结以上是内存溢出为你收集整理的Linux中的C类的层次结构/依赖关系图生成器全部内容,希望文章能够帮你解决Linux中的C类的层次结构/依赖关系图生成器所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)