How to perform multiple calls to startBehavior method in Rational Rhapsody

Technote (FAQ)


Question

How do you perform multiple calls to startBehavior method in IBM Rational Rhapsody?

Cause

You would like to know if it is possible and correct to call the starrtBehavior method more than once

Answer

Yes, you can make a call to startBehavior() method more than once as shown in the sample code below:


bool PDEV_User_SM:startBehavior() {                                    
bool done = true;                                                      
done &= OMReactive:startBehavior();                                    
return done;
       

In the above example class PDEV_User_SM inherits the class OMReactive which inturn contains startBehavior() method. Hence this is function overriding where in the startBehavior() method is first called by class PDEV_User_SM and if the done value is TRUE then startBehavior() is called for the OMReactive class.

Though these are calls to the same method there would have no implications or side affects in the model.


Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational Rhapsody
General Information

Software version:

7.5.3, 7.5.3.1, 7.5.3.2, 7.6, 7.6.0.1, 7.6.1, 7.6.1.1, 7.6.1.2, 8.0, 8.0.1, 8.0.2

Operating system(s):

Linux, Windows

Reference #:

1605865

Modified date:

2013-05-01

Translate my page

Machine Translation

Content navigation