Thread: [Doxygen-users] Multiple functions with same name-how to reference?
Brought to you by:
dimitri
From: Tom U. <to...@io...> - 2014-07-23 16:38:48
|
Hi All, I am using doxygen 1.8.7 to document our embedded firmware repository. There are a number of individual projects there each with its own main function. How do I \ref a specific one? Obviously simply using \ref main picks the first one doxygen finds. I tried something like \ref deviceA_main.c#main but that did not work. Is there a way to do this? Indeed I notice that doxygen in general gets a little confused here. Does it not have some level of locality when dealing with multiple programs in different directories? That is, a way to notice that void foo(); in \devicea\file1.h goes with the void foo(){} in \devicea\file1.c not the one in in \deviceb\file1.c? All the best, Tom |
From: Tom U. <to...@io...> - 2014-07-23 17:04:31
|
Damon, > For C++, we use the class name > > \ref myClassName::foo() Right, I do that too for C++. Do you know a way for C? I can only think of the filename as a differentiating element there but I cannot find a way to tell doxygen that. Cheers, Tom > > - Damon > > Inactive hide details for Tom Udale ---07/23/2014 12:39:25 PM---Hi All, > I am using doxygen 1.8.7 to document our embedded firmwTom Udale > ---07/23/2014 12:39:25 PM---Hi All, I am using doxygen 1.8.7 to document > our embedded firmware repository. > > > From: > > > Tom Udale <to...@io...> > > To: > > > dox...@li..., > > Date: > > > 07/23/2014 12:39 PM > > Subject: > > > [Doxygen-users] Multiple functions with same name-how to reference? > > ------------------------------------------------------------------------ > > > > Hi All, > > I am using doxygen 1.8.7 to document our embedded firmware repository. > There are a number of individual projects there each with its own main > function. > > How do I \ref a specific one? Obviously simply using \ref main picks > the first one doxygen finds. I tried something like > > \ref deviceA_main.c#main > > but that did not work. > > Is there a way to do this? > > > > Indeed I notice that doxygen in general gets a little confused here. > Does it not have some level of locality when dealing with multiple > programs in different directories? That is, a way to notice that > > void foo(); in \devicea\file1.h goes with the void foo(){} in > \devicea\file1.c not the one in in \deviceb\file1.c? > > > > All the best, > > Tom > > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Doxygen-users mailing list > Dox...@li... > https://lists.sourceforge.net/lists/listinfo/doxygen-users > > |
From: Dimitri v. H. <do...@gm...> - 2014-07-24 18:40:12
|
Hi Tom, On 23 Jul 2014, at 18:12 , Tom Udale <to...@io...> wrote: > Hi All, > > I am using doxygen 1.8.7 to document our embedded firmware repository. > There are a number of individual projects there each with its own main > function. In that case I typically suggest to do a doxygen run for each project separately. > > How do I \ref a specific one? Obviously simply using \ref main picks > the first one doxygen finds. I tried something like > > \ref deviceA_main.c#main > > but that did not work. > > Is there a way to do this? > No there is not. Wouldn't work correctly with automatic links. Regards, Dimitri |
From: Tom U. <to...@io...> - 2014-07-24 19:54:33
|
Hi Dimitri, >> >> I am using doxygen 1.8.7 to document our embedded firmware repository. >> There are a number of individual projects there each with its own main >> function. > > In that case I typically suggest to do a doxygen run for each project separately. I see. Is there a nice way to tie them all together into one website that does not require significant outside HTML coding? >> How do I \ref a specific one? Obviously simply using \ref main picks >> the first one doxygen finds. I tried something like >> >> \ref deviceA_main.c#main >> >> but that did not work. >> >> Is there a way to do this? >> > > No there is not. Wouldn't work correctly with automatic links. That is too bad. All the best, Tom |
From: Tom U. <to...@io...> - 2014-08-06 13:36:47
|
Hi Dimitri, >> I am using doxygen 1.8.7 to document our embedded firmware repository. >> There are a number of individual projects there each with its own main >> function. > > In that case I typically suggest to do a doxygen run for each project separately. I really having it all together in one place. I set up a decent amount of related pages that steer the user through it all and it is nice to have the overview of all the projects - particularly since many of them are master-slave type devices that share protocol files and in general go together. I tried messing with tags somewhat but that did not work out very well for me. > >> >> How do I \ref a specific one? Obviously simply using \ref main picks >> the first one doxygen finds. I tried something like >> >> \ref deviceA_main.c#main >> >> but that did not work. >> >> Is there a way to do this? >> > > No there is not. Wouldn't work correctly with automatic links. That is a shame. It seems like it might be possible to make some assumptions that would allow automatic link creation in most cases. For example a prime one would be that void foo(); in \dir\bar.h goes with the void foo(){} in \dir\bar.c not the one in \dir2\bar.c. Obviously there are plenty of ways for that to fall apart, but it is not a bad assumption. A somewhat workable solution to this that does not require much trickery is: #ifdef DOXY_BUILD #define main this_particular_project_main #endif void main() { } Then of course you define DOXY_BUILD in doxygen. This way you can at least \ref to a particular main from your related pages to get the reader to the root of it all easily. I would not want to do it if I had a significant pattern that involved like-named static functions for example, but it works ok for this. All the best, Tom PS I am noticing that my posts to doxygen-users are no longer being echoed back to my email. My earlier ones were. Now I only see the replies. Is there some setting for that in my account? |