Elements of a component diagram Features of components Use the Features window to define a component. General Features Љ Name specifies the name of the component. Љ L specifies the label for the element, if any. Љ Stereotype specifies the stereotype of the component, if any. They are enclosed in guillemets, for example «s1» and enable you to tag classes for documentation purposes. See Stereotypes for information on creating stereotypes. Note: The COM stereotypes are constructive; that is, they affect code generation. Љ Directory specifies the root directory for all configurations of the component. This can be the project directory or another directory.
Љ Libraries specifies any additional libraries to be added to the link. This field is relevant for executables only. Libraries can be off-the-shelf libraries, legacy code, or Rational Rhapsody-generated libraries. Љ Additional Sources specifies external source files to be compiled with the generated source files. Rational Rhapsody adds the files to the project makefile. Љ Standard Headers specifies header files to be added to include statements in every file generated for the project. Specify either a full path or, if only a filename, add a path in the Include Path field. Љ Include Path specifies the directory in which the include files are located.
Note that this field supports environment variables, such as $ROOT\Project\ExternalCode . Љ Type specifies the build type. Select Library , Executable , or Other . Rational Rhapsody does not generate code for a component that has build type “other,” nor can such a component be set as the active component. “Other” could be used to designate script files or other non-code files. Component scope The Scope tab of the Component Features window allows you to specify which model elements should be included in the component. If you select the Selected Elements radio button, you can use the check boxes next to each element to indicate which model elements should be included in the component.
If you select a check box for an element, all of the elements that it contains are included in the component scope (for example, all of the classes in a package). If you would like to be able to select sub-elements individually, right-click the check box of the parent element. Rational Rhapsody 851