As described in Section State Machines, QM™ provides extensive support for modern Hierarchical State Machines (HSMs)↑ (UML Statecharts). From the code engineering point of view, state machines are the most "constructive" element of the UML and the support of state machine code generation is the most valuable aspect of QM. This section describes the state machine implementation strategies and coding aspects for hierarchical state machines in C and C++.
As described in Section State Machine Base Classes, QM™ supports two state machine implementation strategies, depending on the selected base class for the application-level state machine:
Apart from selecting the superclass
(base class) in the Class Property Sheet, the constructor of the application-level state machine must call the appropriate base class constructor. For example, a state machine class derived from QHsm
must call the QHsm
constructor and class derived from QMActive
must call QMActive
constructor.
The Section Class Constructors in C describes how to model class constructors in C. has been described in the B