rootState_entDef

This method initializes the statechart by taking the default transitions.

Visibility
Public
Signature
virtual void rootState_entDef();
Notes

OMReactive has an implementation for the rootState_entDef and undoBusy methods. For flat statechart implementation, every class that inherits from OMReactive overwrites these methods according to its specific statechart implementation. For reusable statechart implementation, these methods are used as-is.

The Rational® Rhapsody® framework "knows" nothing about the real statechart; it knows only about the rootState_dispatchEvent and rootState_entDef methods. Every concrete class knows how to react to every event because it has generated code for itself. Therefore, for flat statechart implementation, the concrete class overwrites these two virtual methods with its own customized implementation.

Flat statecharts are constructed using switch and if statements.They are more efficient in both time and space, and offer a customized implementation. Reusable statecharts are constructed using objects, and provide typical object-oriented features (for example, inheritance, encapsulation, and polymorphism). They offer a generic implementation. The Rational Rhapsody default is flat statecharts.


Feedback