Re: [Doxygen-users] overloaded C++ functions - any way to consolidate ?
Brought to you by:
dimitri
From: Monique S. <mon...@ea...> - 2015-08-03 23:46:01
|
> Doxygen automatically generates documentation for each signature. What we do is put all the documentation in the first of these, then use auto-cross-references from each of the others to the one with the documentation: /** See Function() */ Well, after lots more research, I’ve learned that lots of people wish for this (overloaded method output to match the general style of the cplusplus references). There are numerous threads in StackOverflow, and numerous experiments and talk, but it seems that it’s simply not possible at the moment. I did try the @overload command in Doxygen (http://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmdoverload), but I’m either using it incorrectly or assuming that it will do the opposite of what I expected. (I’m using Doxygen 1.8.10.) DETAILS: Here’s what I’m trying to do, for the following sort of code (albeit very simplified): void foo(int a); <—function to be referenced void foo(int a, int b); <—overload 1 void foo(int a, char* b); <—overload 2 I put the “function to be referenced” at the top of my class declaration, per Note 1 in the Doxygen manual. Then for both the “overload 1” and “overload 2” functions, I included the “@overload void foo(int a)” command. For both “overload 1” and “overload 2”, I expected to get the generated message, “This is an overloaded member function, provided for convenience...” to be used as the @brief description, or to at least get the @brief description to appear in the class summary pages; and then in the details, I’d expect to see the both the “overloaded member” generated message and the full contents of the Doxygen comment. But instead, it’s reversed in logic, and missing output. The output for the function to be referenced (foo(int a)) has the “overloaded member” generated message. And the other functions do not have any Doxygen comment output. THE QUESTION: I can understand the reverse logic that is putting the “overloaded” generated message in the function to be referenced – after all, that is the function that is overloaded. But why is all output from the “overload 1” and “overload 2” functions missing? Thanks for any ideas and suggestions, -Monique |