Book a Demo

Author Topic: Modeling an instantiated template in C++  (Read 3279 times)

cable000

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Modeling an instantiated template in C++
« on: January 29, 2009, 07:30:10 am »
EA Version: 7.1.834

I'm trying to model an instantiated template ( e.g. template class Foo< int > ) in EA and I'm not having any luck with the provided documentation. Can anyone give me a quick pointer to doing this or pointing me to some helpful documents?

Thanks

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Modeling an instantiated template in C++
« Reply #1 on: January 29, 2009, 07:50:04 am »
Here's a trick...

Take a piece of code that reflects your intended paradigm. Try reverse engineering to EA, with the option to create diagrams turned on (which should be the result). What do you see?

I think you might want to open the tagged values window for this, but I am not sure.
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Modeling an instantiated template in C++
« Reply #2 on: January 29, 2009, 08:38:06 am »
In the detail tab of the class properties dialog, set the template type to instantiated, and fill in the arguments field.  (In your example it would be 'int'.)

The instantiation process doesn't appear to be documented at http://www.sparxsystems.com/uml_tool_guide/uml_dictionary/parameterisedclassestemplate.html

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Modeling an instantiated template in C++
« Reply #3 on: January 29, 2009, 08:52:08 am »
It is now (very briefly) but you probably won't see the change now until the release after 7.5 Beta.
Best Regards, Roy