Connecting objects through ports

If you are using an external application (such as the MFC GUI) where the links are created at run time, you can link objects with ports specified by IBM® Rational® Rhapsody® using calls like the following examples:

About this task

a.getSrc()->setItsJ(b.getMon()->getItsJ());
b.getMon()->setItsI(a.getSrc()->getItsI());

Procedure

  1. Create a temporary package that creates the links for you.
  2. Copy the .cpp file for the new package to the correct class.
  3. Modify the code as needed.

Feedback