Defining macros in requirements results in incorrect code generation in Rational Rhapsody

Technote (troubleshooting)


Problem(Abstract)

Attempts to define macros in requirements results in non expansion of macros in generated code in IBM Rational Rhapsody




Symptom

Steps to reproduce:

  1. Launch Rational Rhapsody
  2. Add 2 Packages viz., Requirements and Design
  3. In Requirements package add some requirements viz., Req1
  4. In Design package add a class viz., Class1
  5. Add a constructor (under Class1) containing requirement viz.,Req2 and having a dependency to Req1
  6. In the Rational Rhapsody model create a Macro with a value using the property CPP_CG::Requirement::Macro_Name
    (Note: This property has to be defined in the Rhapsody property file - site.prp)
  7. Set CG::Configuration::IncludeRequirementsAsComments property as Always in the property of the package
  8. Use the macro in the description template of the Requirement
    (CPP_CG::Requirement::DescriptionTemplate)
  9. Generate code for Class1 and verify in Class1.cpp that the macros do not get expanded. It merely appears as plain text.


Cause

This issue was identified as a product defect and logged under APAR PM80547.

Environment

[Rhapsody Information]
Version:=8.0
Build:=5074847
Serial No:=9276595843891208
Language:=C++
Edition:=Development Edition

[System Information]
System-version=Windows XP
System-Service-Pack=Service Pack 3
System-Build=2600

Resolving the problem

No known workaround.

Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Rhapsody
General Information

Software version:

8.0

Operating system(s):

Windows

Reference #:

1624065

Modified date:

2013-02-01

Translate my page

Machine Translation

Content navigation