Using SoftBench Class Graph/Editor
Sample Use Models
or function template member (parameterized function). (You may want to use SoftBench Class Graph/Editor to create a class with the desired components, and then convert that class to a template using another editor.) However, you can perform any other operation with class templates, such as adding or removing member functions and data members, and deriving classes from the template.
When you derive a class from a class template, SoftBench Class Graph/Editor prompts you for the template parameters. You cannot derive a class directly from a template; you must derive from an instance of the template. When you enter the parameters, SoftBench Class Graph/Editor references a template instance of the appropriate type (creating one if necessary), and derives the new class from the template instance.
For example, suppose you have a template A that accepts one parameter. If you specify an inheritance relationship between A and a class B, SoftBench Class Graph/Editor prompts you to enter the template parameter. If you enter "int", SoftBench Class Graph/Editor creates a class (template instance) A<int>, and derives B from A<int>. If you want to derive other classes from an int instance of A, specify A<int> as the base class.
Using Configuration Management
SoftBench Class Graph/Editor attempts to edit all files containing updated class information. (A single change may affect many files. For example, if you change the name of a class, every reference to that class must be updated.) SoftBench Class Graph/Editor assumes any
142 | Chapter 5 |