Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我触发 process_event("eventname") 时,如何检查是否发生了状态转换或是否调用了 no_transition?
基本上,我希望触发/调用 process_event("eventname") 的类能够判断转换是否发生。目前我无法确定这一点。
有任何想法吗?
谢谢
process_event 的返回值为:
typedef enum { HANDLED_FALSE=0, HANDLED_TRUE =1, HANDLED_GUARD_REJECT=2, HANDLED_DEFERRED=4 } HandledEnum;
你想要的可能是所有除了HANDLED_FALSE,它附带no_transition。
HANDLED_FALSE
no_transition