ibm Rational Rhapsody 7.5 — Inlining of statechart code

Statecharts event, when the interrupt handler is decommissioned, you replace the vector in the vector table with the original address. Inlining of statechart code Consider the following statechart: When you implement this statechart using the flat scheme, you should expect the following methods to be added to the class and called through a series of a few function calls from rootState_dispatchEvent() :

int MyClass::s2TakeNull() { int res = eventNotConsumed; s2_exit(); //#[ transition 2 f2(); f2(); //#] s3_entDef(); res = eventConsumed; return res; }; int MyClass::s1TakeNull() { int res = eventNotConsumed; s1_exit(); //#[ transition 1 f1(); f1(); //#] s2_entDef(); res = eventConsumed; return res; }; In fact, what happens is that the transition code (between the //#[ and //#] brackets) is immediately inlined (embedded) inside rootState_dispatchEvent() , as follows: int MyClass::rootState_dispatchEvent(short id) { int res = eventNotConsumed; switch(rootState_active) { case s1: { if(id == Null_id) { popNullConfig(); 786 User Guide