Instantiating a template class

Procedure

  1. Create a class in an object model diagram or in the browser.
  2. Open the Features window for the class.
  3. On the General tab, in the Class Type area, select the Instantiation radio button.
    Notice that the Template Instantiation tab displays.
  4. On the Template Instantiation tab, select a template from the Template Name list box.
  5. To view/modify the parameters for a template, double‑click the template name or click the Invoke Feature Dialog button Invoke Feature Dialog button to open the Template Instantiation Argument window. Click OK to return to the Template Instantiation tab.

Results

When code is generated, the template instantiation is represented by a typedef in C++ and by a class in Java.


Feedback