Thread: Re: [Doxygen-users] problem with class hierarchies with templates
Brought to you by:
dimitri
From: Christoph K. <ko...@in...> - 2001-06-18 13:33:34
|
kri...@ic... said: > Is anyone interested in this at all except me? Emphatically, yes!! I sent Dimitri some related examples quite a long time ago, but as I understand him template parsing has never been a strong point of Doxygen. Dimitri has loads of stuff to do and I am afraid that templates are somewhat on a back burner since they are not heavily used by most developers. The current state of affairs makes Doxygen (a fine documentation tool [the finest!!!], nevertheless) pretty much unusable for documenting template-heavy code (like template metaprogramming or expression template libraries). I was about to propose Doxygen as documentation tool for the boost (www.boost.org) libraries, but initial tests on several of the boost libraries showed many of Doxygen's limitations in parsing templates. Perhaps Dimitri can document somewhere Doxygen's actual template parsing capabilities (like explicit specialization, partial specialization, default parameters, non-type parameters, inheritance from template parameters classes or from classes dependent on template parameters). Another problem is, of course, that class diagrams (such as popularized by OMT, Booch, UML, you name it) are inherently unable to meaningfully deal with parameterized classes, at least with C++'s implementation of this concept. Christoph -- ================================================================================ Christoph Koegl, Dept. of Computer Science, University of Kaiserslautern E-Mail: christoph at familie-koegl dot de WWW: http://www dot familie-koegl dot de/ -------------------------------------------------------------------------------- There are no stupid questions, but there are a LOT of inquisitive idiots. -------------------------------------------------------------------------------- |
From: Dan M. <dm...@Cr...> - 2001-06-19 11:48:42
|
"Hendrik Schober" <Do...@HS...> wrote: > "Christoph Koegl" <ko...@in...> wrote: > > > [...] I am afraid that templates are somewhat on a back burner > > since they are not heavily used by most developers. [...] > > If this is the impression then we, who use templates, > have to change it! Templates _are_ used by many > developers! ;^> Agreed! Especially since good-quality implementations of the STL have become available. |
From: Don M. <dmc...@In...> - 2001-06-20 10:06:05
|
"Hendrik Schober" <Do...@HS...> wrote: > "Christoph Koegl" <ko...@in...> wrote: > > > [...] I am afraid that templates are somewhat on a back burner > > since they are not heavily used by most developers. [...] > > If this is the impression then we, who use templates, > have to change it! Templates _are_ used by many > developers! ;^> Dan Muller <dm...@Cr...> wrote >Agreed! Especially since good-quality implementations of the STL have become >available. I'm mostly a lurker on this list, but I'll chime in here and say that I too use templates and doxygen, and have struggled to get useful output for my classes. Improvements here would be most welcome. At the same time, I do appreciate Doxygen -- it's a great tool. Thanks Dimitri. Don |
From: Kris T. <kri...@ic...> - 2001-06-18 14:14:57
|
> Another problem is, of course, that class diagrams > (such as popularized > by OMT, Booch, UML, you name it) are inherently unable to > meaningfully deal with > parameterized classes, at least with C++'s implementation of this concept. > > I admit I don't have a clear view on this. However, I sort of think that for leaf-classes, it is perfectly possible to have a clear inheritance diagram (after all, if there isn't a clear inheritance tree, it won't compile...). Indeed, at the end of a hierarchy tree, all 'intermediate' templates have to be resolved (i.e. the only ones left are the template parameters of the class itself). The question really is what to do with 'intermediate' classes. One option would be to do the same as for a 'leaf' class, i.e. you make the inheritance tree only upto the current class, and do not show whatever is below it (so, your intermediate class IS a leaf class). It looks like the dot-generated hierarchies for leaves are already pretty close to this (my previous mail was a counter-example, but I'd hope it's not too difficult to take this into account as well). Another option is to do show whatever comes lower but only heuristically, i.e. without looking at template arguments at all. One could look at doxygen's current attempt in this way. As long as this is stated clearly, I could live with it. I guess the latter approach could be improved upon by some kind of postprocessing of the hierarchies: the hierarchy for any intermediate class could be found by merging the hierarchies of all leaf classes. This doesn't sound easy though. What about the 'class hierarchy' list ? It attempts to start at the 'root' of the hierarchy. This is difficult/impossible for exactly the same reasons as before. Again, I could live with it if the doc states it somewhere explicitly. I could imagine doxygen finding out it has troubles with the templates, so inserting a warning on top of the class hierarchy page. Summary: an inheritance diagram for anything upwards in the tree should be doable. For anything downwards, it's getting muddy. The dot-generated hierarchy seems pretty close, so maybe a few extra fixes make it usable enough. (Still beats me how the 'default',i.e. non-dot class hierarchy diagrams can be different from the other ones. It seems to say that there are 2 pieces of code to do the same thing in doxygen). Kris Thielemans Imaging Research Solutions Ltd Cyclotron Building Hammersmith Hospital Du Cane Road London W12 ONN, United Kingdom Phone on : +44 (020)8383 3731 FAX on : +44 (020)8383 2029 web site address: http://www.irsl.org/~kris |
From: Hendrik S. <Do...@HS...> - 2001-06-19 05:07:59
|
"Christoph Koegl" <ko...@in...> wrote: > [...] I am afraid that templates are somewhat on a back burner > since they are not heavily used by most developers. [...] If this is the impression then we, who use templates, have to change it! Templates _are_ used by many developers! ;^> > Christoph Schobi |