class diagrams for template heavy design

Hi, 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 design (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. best regards, Vasco Lohrenscheit

On Sun, 06 Feb 2005 07:32:53 +0100, Vasco Lohrenscheit wrote
Hi,
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 design (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: http://www.crystalclearsoftware.com/publications/publications.html 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 Jeff

On Sun, Feb 06, 2005 at 08:57:30AM -0700, Jeff Garland wrote:
On Sun, 06 Feb 2005 07:32:53 +0100, Vasco Lohrenscheit wrote
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
There are no case tools that I know of that do this but the techniquck is callled FODA ( Feature oriented Domain Analysis ). I think Don Batory at utexaqs first came up with it. It is closley associated with a method called GenVoca. Krzysztof Czarnecki wrote a book and his web page has a downloadable chapter on FODA. I don't know if it is still there but Beman Dawes wrote an article on how to do this on the boost site. Take care /ikh
participants (3)
-
Iain K. Hanson
-
Jeff Garland
-
Vasco Lohrenscheit