The object prototype is a good place to define nearly everything related to the finite state machine: the state table, its actions, and their parameters.
对象原型是定义与有限状态机有关的几乎任何东西的合适位置:状态表、它的操作及其参数。
State Machine ? describes the behavior of the active object.
State Machine——描述活动对象的行为。
To use the state machine, I can instantiate a Nonprofit object and call methods on it for each event, followed by a !, as in Listing 2
要使用状态机,可以实例化一个 Nonprofit 对象并在其上为每个事件调用方法,后跟一个 !
应用推荐