|
(3) typedef void (*Tran)(struct StateTableTag *me, Event const *e);
(4) typedef struct StateTableTag {
(5) Tran const *state_table; /* the State-Table */
(6) uint8_t n_states; /* number of states */
(7) uint8_t n_signals; /* number of signals */
(8) uint8_t state; /* the current active state */
(9) Tran initial; /* the initial transition */
} StateTable;
这是QP中的一段C程序部分,其中typedef 声明了Tran。
问题来了但在(5)中 Tran const *state_table; 是什么意思呢?
还有如果我再声明一个 Tran State
哪跟Tran const *state_table; 有什么不同呢?
谢谢
/////////////////////////////////////////////////////////////////
根据我的了解 Tran const *state_table; 是一个函数指针
Tran State 应该是一个函数,我说得对不对呢 ??? |
|