IBM Support

Alternative to have pointers for non-composition Association in Rational Rhapsody

Question & Answer


Question

What is the configuration option in IBM Rational Rhapsody to have an alternate to pointers for non-composition Association?

Cause

Rational Rhapsody for C++ uses regular pointers for non-composition Association Ends. However you would like to use std::auto_ptr<> or boost::shared_ptr<>.

Answer

You can achieve the aforesaid by modifying the below properties in Rational Rhapsody:

  1. CG::Relation::Implementation

  2. OMContainers::Scalar::CType

Example:

Class A is related to Class B (A -> B) through a Non-Composition (Shared or None) having One-To-One relation. By altering the value of property OMContainers::Scalar::CType to std::int, the object itsB will by generated as std::int.

[{"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":"8.0;8.0.1;8.0.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21638652