Nominate our 2022 Qt Champions!

Doxygen in C -- Avoiding repeat documentation

  • So I have a C program that is split into multiple objects. My makefile looks like this:

    <b>all: fadingsim.o jakesimulator.o dspmath_fp.o
    g++ fadingsim.o jakesimulator.o dspmath_fp.o -o fadingsim

    fadingsim.o: fadingsim.c constants.h
    g++ -c -Wall fadingsim.c

    jakesimulator.o: jakesimulator.c jakesimulator.h constants.h
    g++ -c -Wall jakesimulator.c

    dspmath_fp.o: dspmath_fp.c dspmath_fp.h constants.h
    g++ -c -Wall dspmath_fp.c</b>

    Now, in my main function I have:

    extern void getMagnitude(double h[], double hmag[], int len, int normalize);
    extern double getPMF(double x[], int len, double pmf[], int step);</b>

    These functions are declared in the dspmath_fp.h file and defined in dspmath_fp.c . When I generate the documentation (as a Latex document), I would like it so that the file reference for the main function does not include the externs as functions in the file. Rather, I would like these functions to ONLY be documented in dspmath_fp.c, and nowhere else.

    As I'm doing it now, by placing file identifiers on each file and doing in body function documentation, these three functions get repeated in the file reference for dspmath, the main file, and anywhere else that needs to call them.

    How can separate the documentation?


  • Moderators

    Usually when a declaration (and definition) is not doxy-commented, it does not get included. The only tag to made to explicitly hide things is \hideinitialiser.

    What I think you can try (not sure if it will work as you expect) is either "memberof": tag (point it to the original class) or "addtogroup": (create some dummy group as "garbage bin").

Log in to reply