
1 Jun
2004
1 Jun
'04
10:05 p.m.
One more and probably the strongest argument pro your pre-exit trick is that it also works nicely with a transition originating at an outer state. E.g. in the StopWatch state chart you want to do something special when a EvReset event is received and the machine is currently in the Stopped state. You'd then add a Stopped in-state reaction, which does what it has to do with whatever Stopped data members and them simply calls forward_event(). The event will then trigger the transition originating at the Active state. This is cannot be done with the change you proposed. Regards, Andreas