IBM Support

How to enable Accessor and Mutator for an attribute in Rhapsody

Question & Answer


Question

How do you enable Accessor(get) and Mutator(set) for an attribute in IBM Rational Rhapsody?

Answer

The following steps help you enable Accessor and Mutator for an attribute in Rational Rhapsody:

  1. Open the desired Project in Rational Rhapsody

  2. Double Click on the <Project_Name> at the top and select the Properties tab

  3. Set the value for View to All

  4. Navigate to CG::CGGeneral and check the property GeneratedCodeInBrowser

  5. Navigate to CPP_CG::Attribute and check the property AccessorGenerate

  6. Set the value of MutatorGenerate to Always

  7. Click OK

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.5.3;7.5.2.1;7.5.2;7.5.1.1;7.5.1;7.5;7.4;7.4.0.1;7.3;7.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21454820