Wednesday, December 1, 2010

IDL documentation with Doxygen

If you are an Interactive Data Language (IDL) programmer and have to make documentation for your routines, you can always use the IDL framework instruction: DOC_LIBRARY. As far as I know, its output is basically a text file with the information of the functions that have a specially formatted header (the ';+' and ';-' strings). However it does not output documents as done in other applications such as Doxygen. In particular, Doxygen has many features that can be beneficial:
  • Hyperlinked references between methods
  • Grouping of methods
  • Capability to describe the mathematical operations done by the function using LATEX.
  • HTML or hyperlinked PDF output

The problem with Doxygen is that it does not support IDL. Well, yes, it does support IDL, but the "Interface Description Language", not the "Interactive Data Language" one. In order to support the ITTVIS IDL, I've prepared a ruby script that parses the IDL ".pro" files and converts them to something that Doxygen can understand. I've also attached a sample configuration file for doxygen that you can also use as baseline for your projects and a sample code for testing. You will find the code package in the following github repository (yes, you need git to download the package):

http://github.com/Tryskele/idlDoxygen

Feel free to "pull" the repository and contribute to the improvement of the script if you want!

3 comments:

  1. Hi,
    Have you already tried to generate graphs with Doxygen and GraphViz for IDL project?

    Thanks

    Aurélie

    ReplyDelete
  2. Dear Aurélie,

    I think for graphs you will need to give the Source Code to Doxygen.

    So here is my question to Miquel ;

    DO you think that's possible to add .pro source Code in the ouput files and will it be usable by Doxygen ?

    Thanks,


    Vincent ;-)

    ReplyDelete
  3. Ok, I understood what was the problem with the pro2cpp.rb script. It detects all "End" strings (Endfor, Endelse, Endcase, and so on) and not only the last "END" string which ends the pro routine. So if there is a "End" string before the call to another PRO routine, it does not see it!

    As I finish all my IDL routine with "END ;{routine_name}, I've changed the END test with the following test :
    if( strippedFileLine.match( /^END ;\{/ ) != nil ) then ...

    and it works fine!

    Aurelie

    ReplyDelete