开发者

Trying to document 2-dimensional-related objects with doxygen

I am working on some 2D geometry code, in particular a line-class. I have made an enum to describe the relation of line (let's not get into detail concerning this). However to document this, I have something like this:

enum enumRELATION {

   /*!this line  #######
    * other line -------
    *                   
    *     |             
    *  #######          
    *     |             
    *     |             
    */
   RELATION_INTERSECT,

   ...

};开发者_如何学运维

If I let doxygen parse that file, to generate an HTML-file, in the HTML-file this looks like crap (of course). In other words the 2D-plane I try to show is all wrong. I know I can use <br>, to at least get the line breaks, but that's only half the story, because the spaces are still not correct. And the <br>'s makes my documentation in the actual source/header-file look awful. Is there a nice way around this? Or am I too demanding?


You can surround your documentation with the <pre> ... </pre> element, which should nicely keep your line breaks and indentation.

pre is one of the HTML tags that can be safely used in Doxygen documentations, according to this page: http://www.doxygen.nl/manual/htmlcmds.html

Alternatively, you can embed images in your documentation, using the \image command: http://www.doxygen.nl/manual/commands.html#cmdimage

I believe the use of proper images might make the documentation clearer to understand than using 'ascii art' ;)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜