I l @ ve RuBoard |
Step 1: Assign the Visual C++ or Visual Basic Language to the ComponentsComponents must be assigned a language. The language of a component is set for all classes assigned to the component. ASSIGNING A LANGUAGE TO A COMPONENT IN RATIONAL ROSE
The Component Specification for the ProfessorCourseOptions component is shown in Figure B-1. Figure B-1. Component Specification
Step 2: Assign Classes to ComponentsOnce components have been created, classes are assigned to the components. The components represent either a Visual C++ or a Visual Basic project. ASSIGNING CLASSES TO COMPONENTS IN RATIONAL ROSE
The component specification for the ProfessorCourseOptions component is shown in Figure B-2. Figure B-2. Realizes Tab of a Component Specification
Step 3: Use the Model Assistant Tool to Set Code Generation PropertiesThe Model Assistant Tool maps modeling elements in Rational Rose to Visual C++ or Visual Basic constructs. In Visual Basic, the Model Assistant Tool may be used to create and specify constants, declare statements, event statements, enum and type declarations, properties, methods , and method parameters. It also allows you to create Get, Let, and Set procedures for class properties and association roles, and to define and create a user -defined collection class for the class. In Visual C++, the Model Assistant Tool may be used to create and specify class operations like constructors and destructors as well as accessor operations for the attributes and relationships. The Preview field displays the code to be generated for a selected member. This allows you to see how your code generation settings will be applied to the member. The Model Assistant is available for when
Detailed information about the Model Assistant Tool may be found in the Rational Rose Help files. TO START THE MODEL ASSISTANT TOOL
The Model Assistant Tool for a class assigned the Visual Basic language is shown in Figure B-3. The Model Assistant Tool for a class assigned the Visual C++ language is shown in Figure B-4. Figure B-3. Visual Basic Model Assistant
Figure B-4. Visual C++ Model Assistant
Step 4: Select the Components and Use the Code Update Tool to Generate the CodeThe Code Update Tool is used to generate the Visual C++ or Visual Basic code. Code may be generated for all components in a package, a single component, or a set of components. TO START THE CODE UPDATE TOOL
The Code Update tool is shown in Figure B-5. Figure B-5. Code Update Tool
Detailed information about the Code Update tool may be found in the Rose Help files. Step 5: Evaluate the Code Generation ErrorsWhen the code generation process is complete, the Summary window is displayed in the Code Update tool. The Summary tab contains information about the generated code and all code generation errors are written to the Log, which can be viewed by selecting the Log tab of the Summary window. The Summary window is shown in Figure B-6. Figure B-6. Summary Window
|
I l @ ve RuBoard |