Menu

Duplicate function descr. in latex output?

Yogo
2007-09-21
2013-06-11
  • Yogo

    Yogo - 2007-09-21

    Hi,

    another problem concerning latex compiling. I create pdf's mainly from C files and corresponding header files. If I include both "module.c" and "module.h" as project source, the latex output produces same function descriptions two times; once in c file documentation and another time in h file documentation.

    This is very much unwanted because this makes documentation two times longer than necessary...

    If somebody knows how to "disable" documentation from another source, I'd appreciate it very much. I'm running out of ideas soon...

     
    • keith

      keith - 2007-09-22

      What I've done is put documentation in the function header with the function definition, and put just @ingroup in a comment in the declaration (header) file with the prototype.

      In some file that you include in Input (I use a Doxy-only header, say dox_conf.h) do,
      /**
      * @defgroup SOME_GROUP_NAME "My Function Group"
      *
      */

      In function definition
      /** This is my function brief.
      *
      *  @param var1
      *  @param var2
      * ...etc...
      */
      myReturnType myDummyFunction( Var1Type var1, Var2Type var2, ...etc... )
      {
      ...
      }

      In the headef file with the prototype
      /**
      * @ingroup SOME_GROUP_NAME
      */
      myReturnType myDummyFunction( Var1Type var1, Var2Type var2, ...etc... );

      The result is that the function documentation will be under the Modules tab under your group name, and not in the file documentation, though the prototypes. If you document in the header and not the definition file, then just reverse the roles. You could even try just putting the @ingroup in the header with the other documentation so that it's all in the same file for that matter. Experiment, have fun...

       
      • Anonymous

        Anonymous - 2007-10-23

        I also get double documentation when I specify .c and .h files.

        However I would have thought that specifying the header file would not be required since since the preprocessor could pick up the header file name from the #include statement int he source file... but that doesn't seem to work - the #include line is ignored. Any ideas why?

        Also when I do specify both the source and header files, the doxygen output looks like it treats the function prototypes different from the function definitions and doesn't quite link them up properly so call and caller graphs are not complete.

        Tom

         

Log in to post a comment.