Global namespace
Jason McKesson <[email protected]>
| Newsgroups | gmane.text.doxygen.devel |
|---|---|
| Message-ID | <[email protected]> |
I have been wrestling with a problem with Doxygen's innards for some time now, and I need some guidance. The problem is this. I'm attempting to shoehorn a global namespace (that is, the list of members and member groups that is not part of any namespace) into my XML Doxygen output format. My initial attempt at creating a global namespace was to assume that all member groups and ungrouped members of all FileDefs were, by definition, global. I thought this seemed pretty reasonable. The problem is this: whenever I create a member group in a namespace that is itself global (ie, the first child of the global namespace), Doxygen decides that there are actually two member groups: one that lives in the NamespaceDef and one that lives in the FileDef. This wouldn't be so bad if member groups were treated as first-class objects in Doxygen (the way Definitions are); in that case, I could simply ask the member group for its owning scope and check to see if this is the global namespace or not. The kinda strange part is that, as I just mentioned, Doxygen does have a namespace variable that it does call the "global" namespace. Too bad it doesn't store MemberDefs and member groups that are global; it only stores ClassDefs and NamespaceDefs. So, what I need is one of the following. The best-case obviously would be to have a real global namespace object in Doxygen. I suspect this isn't going to happen, due to the quantity of legacy code in Doxygen. Pretty much every output formatter would need to change. Another would be for member groups to be treated as first-class objects, such that if two Definitions share them, then they are sharing the same member group pointer, and the member group would derive from Definition like everything else. And member groups can access their owning scopes. For the same reason as above, I won't hold my breath. Which brings me to the last possibility: hackery. I need an algorithm that uniquely generates member groups that are in the global namespace. Basically, I need to be able to take a member group and ask it if it lives in a namespace already. I see no immediately obvious way of doing so given simply a member group. Is there some way to resolve this issue? ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV