解决方法
尝试
doxygen.它也可能与您的发行版一起发货.
您可能需要GraphViz生成图形.有a simple example和output.
/*! 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),我不记得是否需要这样做).