Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Chọn một lớp học trở lại từ hộp danh sách thả xuống, hoặc nhập một kiểu trả về mới. OR 1. Chọn hoạt động trên một sơ đồ lớp. 2. Sau khi tên hoạt động, nhập một dấu hai chấm, theo sau là kiểu trả về. Ví dụ, nếu bạn có một hoạt động được gọi là In sẽ trả về một | Chapter 12 Introduction to Code Generation and Reverse Engineering Using Rational Rose Generate the code. When reverse engineering code Rose gathers information about the classes attributes operations and relationships between the classes to generate the appropriate model elements. Using round-trip engineering you can modify the model and then change the corresponding code or change the code directly and then update the model. Either way round-trip engineering helps keep your code and object model synchronized. In the next chapters we ll take a look at code generation and reverse engineering in more detail for specific languages. 416 Chapter 13 ANSI C and Visual C Code Generation and Reverse Engineering C is one of the most widely used object-oriented languages in the industry. Rational Rose supports integration with C through its code-generation and reverse-engineering capabilities. In this chapter we ll discuss how to generate C code from your Rational Rose model and how to reverse engineer C code into a Rose model. There are three versions of C integration with Rational Rose. First is the C add-in that has been available in Rose since October 1994. It contains a great deal of functionality but can prove difficult to use. The second is an add-in for Microsoft s Visual C . This add-in is simpler to use but will integrate only with Microsoft s Visual C . Rational therefore has introduced the third add-in ANSI C which is an easy-to-use C code-generation and reverse-engineering tool that will work with C tools other than Microsoft s Visual C . In this chapter we will discuss the ANSI C and Visual C add-ins. The original C add-in is still supported but will not be covered here. We ll discuss the code-generation properties that can be set and take a close look at how each Rose model element is implemented in the code. Setting C code-generation properties Mapping Rose elements to C constructs Generating C code from your Rose model Reverse engineering C code into your .