ibm Rational Rhapsody 7.5 — Code respect

Code respect In Rational Rhapsody, code respect means that the order of elements in the original code is preserved during code generation. This means that you can freely change the order of class members and globals and Rational Rhapsody “respects” those changes. Code respect has these additional features: Љ Code generation regenerates text fragments to the correct place in file. Љ Reverse engineering imports #ifdef-s to the model as a verbatim text. – The branches of #ifdef-s that are seen by the compiler are modeled as logical elements. – The branches of #ifdef-s that are not seen by the compiler are modeled as a verbatim text.

This means that code generated in Rational Rhapsody is similar to the original. This gives you complete flexibility for using manually written code or auto-generated code while receiving all the benefits of modeling. You can reverse engineer C++ and C code into a model in a manner that the model respects the order, location, and dependencies of the global elements in the original code. See Reverse engineering . Note The code respect feature applies to Rational Rhapsody in C and Rational Rhapsody in C++, and the reverse engineering and roundtripping features in these products. As of Rational Rhapsody 7.2, any new project you create has the code respect featured activated by default.

To activate code respect for an old project, see Activating the code respect feature . In addition, you can set up Rational Rhapsody Developer for C++ and C so that you can roundtrip code into the Rational Rhapsody model that respects the structure of the code and preserves this structure when code is roundtripped in the Rational Rhapsody model. When you have changed the order of elements in C++ and C, roundtripping in respect mode preserves the order of the following elements for the next code generation: Љ Global elements Љ Class elements Љ #includes and forward declarations Љ Auto-generated operations (excluding statechart and instrumentation code) Rational Rhapsody 1063