Author Topic: Using Doxygen  (Read 5398 times)

styggentorsken

  • Guest
Using Doxygen
« on: December 11, 2008, 04:11:33 pm »
I have a small project that is getting a little to big for me alone,
so I want to make a documentation in order to be able to cooperate with other developers.
I have started up a little bit with doxygen, which I like so far.

The first annoying thing I ran into is the file documentation, wich naturaly needs to be written for every h file (at least).
It usually looks like this.
Code
#ifndef MYCLASS_H
#define MYCLASS_H

/**
 Declaration of the MyClass class.

 Complete description
 \file myclass.h
 \author Fredrik Ludvigsen
 \date 11/12-08
*/

#endif // MYCLASS_H

Is there any way to generate this correctly, perhaps by using one of the plugin wizards?
When I tried, the headerfile wizard included the default code correctly (inside the header guards), but I don't know how to get the
date right. The class wizard (wich I prefer) did put the default code outside of the header guards (in front)...

Anyone know how to get that time generated? And maybe synchronized too?
Other hints on using doxygen and C::B are also appreciated.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5914
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Using Doxygen
« Reply #1 on: December 27, 2008, 07:30:15 am »
I have maintained a project which as 50+ header files and CPP files.
All I can do is add these code manually one by one. :(
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Using Doxygen
« Reply #2 on: December 27, 2008, 01:46:06 pm »
You could use C::B's scripting engine to automise such things. There was even a Doxygen scripting plugin somewhere in the forums IIRC...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline jomeggs

  • Multiple posting newcomer
  • *
  • Posts: 92
Re: Using Doxygen
« Reply #3 on: January 02, 2009, 02:39:07 pm »
There was even a Doxygen scripting plugin somewhere in the forums IIRC...

It's still there  :D ...

http://forums.codeblocks.org/index.php/topic,8213.msg68472.html#msg68472

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5914
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Using Doxygen
« Reply #4 on: January 02, 2009, 04:49:46 pm »
Thanks jomeggs for your great doxygen tools!
But your script I think can't do the task OP asked. He want to add a doxygen comment to each file in a project.

To: MortenMacFly
I think C::B's scripting engine could do the job. For example. If a project contians a file name A.h. Then, the engine could parser the file name and get it's base string, then generate some thing like

Code
/**
 Declaration of the ****** class.

 Complete description
 \file A.h
 \author ********
 \date 11/12-08
*/


at the beginner of the file. :D. But If I'd be an advanced C::B user, I can do it.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.