Hi there,

As I understand Doxygen, it favours namespaces. I’m documenting an
application whose UI use JavaScript. I have a main file for each page. Each
of these main files have homonyms function names. On of these functions is
simply called `main`.

Say I have `page1.js` to `page9.js `. From say `page1.js`, if I write `@ref
#main`, it will link to that of `page9.js`, the same from `page2.js` and so
on.

Since I refers a lot to function/constant names from comments, that’s a
important deal (function and constant names takes parts in sentences as
verbs and words).

My guess is that the file should be a namespace, but there is no proper
namespace construct with JavaScript (I naively tried to add `@namespace` at
the top of tiles, but does not change anything). The only way a kind of
namespace may appears, is when a module is imported (new in ES6). Even so,
the imported module does not belong to a namespace, it’s a simple JavaScript
file with just optional `export` keywords and `import`. So I have to do
without namespaces. And anymway, these main files are not to be imported.

The C world is used to circumvent the lack of modularity, giving unique
names to each things. But there are statics in C and a C application may be
complied using different file providing similar functions with equal names.
So that’s not really a JavaScript specific issue.

May be I could wrap everything in classes, but I don’t enjoy the idea of
this kind of modifications just to circumvent this (I don’t mind tweaking
the source to please Doxygen, but not this level of modifications). And a
class has a meaning, an intent (ex. it has a constructor, to return multiple
instances), it’s not to be used everywhere or for no good technical reasons.

I wonder if and how some people found their way with this, either with
JavaScript or C, since I feel to guess a solution for C could be applicable
to JavaScript.

if that matters, the application also uses Python, even more than
JavaScript, so the Doxyfile is configured to optimize for Java, which is
what’s recommended for Python. Is there a risk optimizing for Java prevents
me from finding a proper solution?

Have a merry Christmas as much as you can …



--
Sent from: http://doxygen.10944.n7.nabble.com/Doxygen-Users-f3.html

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Doxygen-users mailing list
Doxygen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/doxygen-users

Reply via email to