Book a Demo

Author Topic: Type Parameters (aka C++ templates or Java Generi)  (Read 3373 times)

angel-o-sphere

  • EA User
  • **
  • Posts: 112
  • Karma: +0/-0
    • View Profile
Type Parameters (aka C++ templates or Java Generi)
« on: August 23, 2006, 12:53:05 pm »
I cant figure how to add a template parameter to a Class / Interface or Collaboration, nor a package.

Thats strange as I thought at least classes should be able to allow that ... Version 6.x here.

Edit: I figured it!
However, the fact that a class is a template class is not shown in the diagram, I miss the box with the type parameters in the upper right croner.

Angelo
« Last Edit: August 23, 2006, 01:35:38 pm by aos »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Type Parameters (aka C++ templates or Java Gen
« Reply #1 on: August 23, 2006, 03:08:10 pm »
Angelo,

I thought that EA would display the template class differently. [But this could just be wishful memory on my part.]

I'd look very closely at the EA documentation - things can sometimes be remarkably well concealed there - to find any hints on this. It might also be worth checking stereotypes to see if one 'tickles' EA into using another image.

[I just looked at the 6.5 help file. In the index choose "Templates - Parameterized Classes." This will show you how it is supposed to work. And yes, that's the stuff I thought I remembered, so it should work that way in 6.1 as well. Check that you are doing all the things they say, and inspect the elements that result from their method to see if yours are missing anything like a tag or stereotype.

Otherwise, this might be worth putting to Sparx as a possible bug. If it is real, perhaps they can resolve it before 6.5 goes into production.

David
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Type Parameters (aka C++ templates or Java Gen
« Reply #2 on: August 23, 2006, 03:12:47 pm »
Parameterized classed should show "the box with the type parameters", although class instantiation doesn't show anything.

See http://www.sparxsystems.com/EAUserGuide/index.html?parameterisedclassestemplate.htm

angel-o-sphere

  • EA User
  • **
  • Posts: 112
  • Karma: +0/-0
    • View Profile
Re: Type Parameters (aka C++ templates or Java Gen
« Reply #3 on: August 24, 2006, 05:02:15 am »
Yes,

the box is shown now, no idea what went wrong. Yesterday they where not visible, today after startiong a new session with the tool the diagram shows the template parameters :D

Thanx,

Angelo

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Type Parameters (aka C++ templates or Java Gen
« Reply #4 on: August 24, 2006, 03:10:56 pm »
Glad to hear things are working as expected.