Class Code Structure Initialization and Cleanup These methods implement framework-related initialization and cleanups. For example: void class ::initRelations() { state1 = new state1Class (); // creating the states }; void class ::cleanUpRelations() { }; Implementation of State Classes This section implements a dispatch method and a constructor for each state object. You can change this by choosing the flat implementation strategy, which does not generate state classes. For example: class _ state1 :: class _ state1 ( class * c, State* p, State* cmp):
LeafState(p, cmp) { // State constructor }; int class _ state1 ::takeEvent(short id) { int res = eventNotConsumed; switch(id) { case event1 _id: { res = concept-> state1 Take event1 (); // Dispatching the transition method break; }; }; }; Rational Rhapsody 941