使用 Doxygen 绘制控制理论框图
我正在从事自动化领域的 C++ 项目,我想开始记录。我决定选择 Doxygen。但是,除了记录特定的数据字段和绘制类层次结构 UML 图之外,我还想用如下框图来记录几种方法的功能:
解决方案是什么?
我对 LaTeX 很熟悉。我读过 Doxygen 对 LaTeX 有一些支持,但我不知道这能支持到什么程度。是否可以在 Doxygen 中使用任何 LaTeX 包?您会推荐哪些特定的软件包?您能否提供一些简单的示例?
我也愿意接受与 Doxygen 不同的建议。
I'm working on a C++ project in the field of automatics I'd like to start documenting. I'm rather decided for Doxygen. But, apart of documenting particular fields of data and drawing class-hierarchy UML-diagrams, I'd like to document several methods' functionalities with block diagrams like this one:
What are the solutions?
I'm familiar with LaTeX. I've read Doxygen has some support for LaTeX, I don't know how far this goes, though. Is it possible to use any LaTeX package within Doxygen? Which particular packages would you recommend and could you provide some simple examples as well?
I'm also open to recommendations of something different than Doxygen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果只是记录控制系统结构、变量等,您可以在其他地方生成图表(例如,如果您想使用开源工具,则为 Dia、XFig 或 Inkscape),并通过内部的 image 关键字将它们嵌入到您的 Doxygen 文档中您的代码:
为此,您需要在 Doxyfile 文件中告诉 Doxygen 在哪里可以找到图像,并将图像相对于您的 doxygen 路径放置(DOCROOT/images 在此)案例):
使用乳胶扩展或其他语言驱动的图形标记从 Doxygen 文档中生成图形,恕我直言,这并不能证明学习语言、配置和对齐工具链的开销是合理的。另一方面,如果您已经有一些自动生成图形的工具(从您的代码或配置文件),那么从 Makefile 中运行该工具应该是一件轻而易举的事,让它生成图像并将图像嵌入到通过 image 关键字获取您的 doxygen 文档。
If it's only about getting the control-systems structure, variables etc. documented you can generate the diagram elsewhere (e.g. Dia, XFig or Inkscape if you want to use open source tools) and embed them into your Doxygen documentation via the image keyword from within your code:
To do this you'll need to tell Doxygen in the Doxyfile file where to find the images, and place the images relative to your doxygen path (DOCROOT/images in this case):
Using latex extensions or other language driven graphical markups for generating graphs from within Doxygen doc does imho not justify the overhead of learning the language, getting the tool-chain configured and aligned. On the other hand if you have some tool already which is generating the graph automatically (from your code or a config file), it should be a breeze to run the tool from within a Makefile, let it generate the image and embed the image in your doxygen doc via the image keyword.