FWStateTransition

@interface FWStateTransition : NSObject

状态转换器

  • 有限状态机,只读

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) FWStateMachine *_Nonnull machine;
  • 事件对象,只读

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) FWStateEvent *_Nonnull event;
  • 来源状态,只读

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) FWState *_Nonnull sourceState;
  • 目标状态,只读

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) FWState *_Nonnull targetState;
  • 附加参数,只读

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) id object;
  • 初始化转换器

    Declaration

    Objective-C

    + (nonnull instancetype)transitionInMachine:(nonnull FWStateMachine *)machine
                                       forEvent:(nonnull FWStateEvent *)event
                                      fromState:(nonnull FWState *)sourceState
                                     withObject:(nullable id)object;