Handling two different functions with the same name in Doxygen

前端 未结 4 1842
梦谈多话
梦谈多话 2021-01-17 18:02

I have a C project which contains two functions with the same name, but each is within a different group/module (@defgroup).

These functions each compil

4条回答
  •  一向
    一向 (楼主)
    2021-01-17 18:35

    can this work for you?

    The example is stripped down to the two files a.c and b.c, with only one function (the clashing) function.

    file a.c

    /**
     * \defgroup agroup Group A
     */
    
    /** 
     * the function in a, 
     * see also \link b.c myfunc() \endlink the other one 
     * \ingroup agroup
     */
    void myfunc() {
        ;
    }
    

    file b.c

    /**
     * \defgroup bgroup Group B
     */
    
    /** 
     * the function in b, 
     * see also \link a.c myfunc() \endlink the other one 
     * \ingroup bgroup
     */
    void myfunc() {
        ;
    }
    

    as you see, myfunc() has a name clash. I placed a link to the other function in the documentation.

    I perpended the function name by the filename.

    I compiled it with doxygen and the links worked (they linked from each documentation of a function to the other function).

提交回复
热议问题