
31 Aug
2008
31 Aug
'08
1:28 p.m.
Andrey Semashev wrote:
Not exactly. You don't have to override the transit handler unless you want to define some non-trivial transition logic. If you stick to the same degree of functionality that TMP provides (IOW, no runtime conditions for the transition to take place), then you can use the fsm::transition class as a direct replacement for the row template in the TMP approach.
If you have to decide when and which state to transit to in runtime, then yes, you have to define your custom transition rule.
But how can I specify the "transition action", if not by overriding the "transit" method? And even if I override the "transit" method, how should I handle the fact that the event will still be delivered to the target state?