From: Jeff Garland (jeff_at_[hidden])
Date: 2005-02-06 10:57:30
On Sun, 06 Feb 2005 07:32:53 +0100, Vasco Lohrenscheit wrote
> sorry if this offtopic, but I don't know any other good place to ask
> this question:
> I'm currently in the situation to document a heavy templated class
> (generic with templated policies and partial specializations, but
> nothing too exotic like boost::mpl ;-). I always prefer graphical
> UML like class diagrams to describe the basic design. Now I wonder
> if there are any good graphical representations for templated code
> but haven't found anything on this with a quick google search.
> As there are so many template wizards on this list, has someone any
> hints, links, suggestions on this? Thanks.
UML offers some limited support for templates, but since it omits modeling of
non-member functions (template or otherwise) it has serious limits for dealing
with C++. You can see one attempt to use UML for a template design at:
Select the html or pdf version of Building a Generic Date-Time Framework - An
Experience Report using C++ Templates. You'll find one UML depiction of the
date-time architecture there.
In Modern C++ Design there's lots of UML -- focused almost exclusively on a
model that describes the final instantiated structure of the templates.
Also, if you are willing to go outside UML pick up a copy of Generative
Programming -- they describe other visual modeling techniques.
Czarneecki, Krzysztof and Eisenecker, Ulrich, "Generative Programming:
Methods, Tools, and Applications", Addison-Wesley, 2000
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk