IBM Support

Change friend dependency and typedef declarations order of inner classes

Question & Answer


Question

How do you change the order of friend dependency and typedef declarations of inner classes using code respect and source artifacts in IBM Rational Rhapsody?

Cause

You added friend dependencies and typedef declarations to your inner class. However, the order of the code generation is not as expected and causes compiler errors.


Examples of compiler errors:

  • C2371: 'OuterClass::InnerClass' : redefinition; different basic types

  • C2649: 'OuterClass::InnerClass' : is not a 'class'

Answer

You can copy your IBM Rational Rhapsody generated source code to different positions in the class. Then, IBM Rational Rhapsody round trip the source code back into your UML (Unified Modelling Language) Model.








Your changes persist in Source Artifact model elements.



[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.0;8.0.1;8.0.2;8.0.3;8.0.4;8.0.5;8.0.6;8.1;8.1.1;8.1.2;8.1.2.1;8.1.3;8.1.4;8.1.5;8.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21996300