![]() |
![]() |
![]() |
![]() |
Show Hidden Items Cleared Show Hidden Items Cleared
If the Show hidden items check box is cleared when importing scrrun.dll, no hidden type library items are shown on the type library's overview diagram. Also, the hidden type library items are inserted into a separate package called "Hidden" in the type library's package in the browser.
Figure 108 shows how the Microsoft Scripting Runtime component, scrrun.dll, is presented when imported with the Show hidden items check box is cleared.
Figure 108 Type Library with Show Hidden Items Option Cleared
In this view, only the type information that is relevant for Visual Basic clients is shown on the type libraries overview diagram, and all hidden type library items are inserted into a separate package called Hidden. This view is recommended when developing Visual Basic clients because it corresponds to the view that is shown by the Object Browser in Visual Basic (see Figure 106 on page 203).
Using an Imported Type LibraryBy importing type libraries into the model, you are able to show how classes in the model use and depend upon classes in other components, regardless of their implementation language. The application you are modeling can use a type library in several ways, for example:
- Classes can use the data types defined by a type library.
- Classes in the model can implement the interface of a COM component.
- A COM component can be reused by the application.
How to use a type library depends on the programming language. For more information, refer to the Rational Rose documentation of each language integration.
Adding Class Members to a Quick Import Type LibraryIf a type library was imported using a quick import, the Type Library Importer did not create any class members (attributes and operations) on the imported items. You can later import the class members of a type library item by doing a full import of that item.
To add class members to a type library:
- 1 In the browser or in a diagram, right-click:
- an interface to import its class members into the model.
- a coclass to import the class members of its interfaces into the model.
- a COM component to import the class members of all the items in that type library.
- 2 Click Full Import on the displayed menu.
Note: It may take several minutes for Rational Rose to perform a full import of an entire COM component. If you do not want to import the entire type library, perform a full import of only those type library items that you are using.
Customizing the Type Library ImporterIn the COM Properties dialog box, you can control how type libraries are imported into the model. For example, you can control:
- What should happen with existing type libraries when importing new versions.
- The name and location of new type libraries in the model.
- The name, location, and contents of the overview diagrams that are created when importing type libraries.
To open the COM Properties dialog box, click Tools > COM > Properties.
Figure 109 COM Properties Dialog Box
Note: Changing the settings in the COM Properties dialog box affects only type libraries that are imported after the settings are changed.
To replace existing type libraries when importing new versions:
Select the Upgrade older type libraries check box in the COM Properties dialog box.
The next time you import a new version of a type library, the current version is replaced by the new version. If this check box is cleared when you import a new version of a type library, the model will contain both versions.
To hide items that are defined as hidden or called "_item":
Refer to Hiding Type Library Items on page 205.
To show the composition hierarchy for imported type libraries:
Select the Construct composition hierarchy check box. The next time you import a type library, the Type Library Importer adds association relationships between its related interfaces, which indicate the type library's composition hierarchy.
To change the name of the logical packages in which type libraries are created:
In the Default package box under Logical view in the COM Properties dialog box, type the name of the package including the path of any enclosing packages. You can use the following variables in the package name:
- $library -- the name of the imported type library, which corresponds to the library model property
- $version -- the version of the imported type library, which corresponds to the version model property
- $helpstring -- a description of the type library, which corresponds to the helpstring model property
For example, COM/$library Ver $version ($helpstring) means that the following logical package is created for a new type library called stdole:
Logical View
COM
stdole Ver 2.0 (OLE Automation)
To change the name of the component packages in which type library components are created:
In the Default package box under Component view in the COM Properties dialog box, type the name of the package including the path of any enclosing packages. You can use the same variables as above.
For example, COM/$library Ver $version ($helpstring) means that the following component package is created for a new type library called stdole:
Component View
COM
stdole Ver 2.0 (OLE Automation)
You can change the name and location of the diagrams on which type libraries are displayed. In the Overview diagram box under Logical view or Component view in the COM Properties dialog box, type the name of the diagram including the path of any enclosing packages. You can use the same variables as above in the diagram name.
For example, the default value for the logical view is COM/$library Ver $version ($helpstring)/Overview of $library, which means that the Type Library Importer creates a diagram called Overview of stdole Ver 2.0 (OLE Automation) when you import a COM component called stdole.
The default value for the component view is COM/Overview of type libraries. This means that the Type Library Importer inserts all imported type library components into the same diagram, which is called Overview of type libraries.
Rational Software Corporation
http://www.rational.com support@rational.com docs@us.ibm.com Copyright © 1993-2000, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |