开发者

Drawing control-theory block diagrams with Doxygen

开发者 https://www.devze.com 2023-04-11 05:55 出处:网络
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 particul开发者_开发百科ar fields of data and drawing

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 particul开发者_开发百科ar fields of data and drawing class-hierarchy UML-diagrams, I'd like to document several methods' functionalities with block diagrams like this one:

Drawing control-theory block diagrams with Doxygen

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.


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:

/*!
.. Doxygen doc here..
\image html Data_Model.png "Figure 1: UML Diagram of the Data Source and Data Model Relationships"
*/

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):

# The IMAGE_PATH tag can be used to specify one or more files or 
# directories that contain image that are included in the documentation (see 
# the \image command).

IMAGE_PATH             = images

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消