IBM Support

How to enable Accessor and Mutator for an attribute in Rhapsody

Technote (FAQ)


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

Document information

More support for: Rational Rhapsody
General Information

Software version: 7.2, 7.3, 7.4, 7.4.0.1, 7.5, 7.5.1, 7.5.1.1, 7.5.2, 7.5.2.1, 7.5.3

Operating system(s): Windows

Reference #: 1454820

Modified date: 13 July 2011