Skip to main content
GameDev.net gamedev.net
🔒 Locked 🎮 Unity

Placing code documentation in DOxygen/alternative.

Started by tolsen Oct 18, 2005 at 6:39 AM 2 replies 1k views
Original Post
tolsen
tolsen
A question for those of you experienced with DOxygen or some other code documentation system. Is there any way for me to keep this way of documenting my code and still allow extraction for code documentation (in the .cpp file)? Vector3 Vector3::operator + (const Vector3& operand) const // @summary A summary of the method. // // @arg operand - A description of the operand. // @returns A description of the return. // { return Vector3(x + operand.x, y + operand.y, z + operand.z); } I first found this way of commenting in a Maya plugin example. I wish to keep the comment in-between the method name and its body.
jpetrie
jpetrie
I use a very similar style and Doxygen (the O is not officialy capitalized, btw) parses it just fine. Doxygen supports the @arg tag, but not @returns or @summary. You'd have to change them to @return and @brief (you can also omit @brief and have Doxygen interpret the first view lines as the brief description and the rest as the detailed description).

If you are really set on keeping that EXACT format you might be able to hack the source a little bit to add those tags -- but the Doxygen source isn't exactly a simple bit of code.
CipherCraft
CipherCraft
Quote:
Original post by jpetrie
-- but the Doxygen source isn't exactly a simple bit of code.


Amen to that!

I've used Doxygen for a fairly large code base (700+ classes if I remember correctly) and had to find a way to extract more information from it. I've edited the code extensively but wouldn't wish it to the worst of my enemies, except one. [wink]

The tool does a very good job but is in desperate need of a rewrite. (sorry, Dimitri!) All the functionality that has been added over the past few years has cluttered it quite a bit. [sad] Then again: it runs fairly stable, which is impressive.

cu,
CipherCraft
JohnBolton
JohnBolton
I think this will work:
    //!< @summary A summary of the method.    //!<    //!< @arg operand - A description of the operand.    //!< @returns A description of the return.    //!< 
If not, then
Quote:
From the doxygen docs:
\fn (function declaration)
Indicates that a comment block contains documentation for a function (either global or as a member of a class). This command is only needed if a comment block is not placed in front (or behind) the function declaration or definition.


John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.