0
我有一个状态机是这样的:的boost ::男男性接触者如何初始化state_machine_def和MSM ::前::状态与非默认构造函数
class FsmDef : public boost::msm::front::state_machine_def<FsmDef> {
private:
Args args;
using State = boost::msm::front::state<>;
public:
FsmDef(Args args) : args{args}
{}
struct InitState {};
struct State1 {
Args1 args1;
State1(Args1 args1) : args1(args1)
{}
};
struct transition_table : boost::mpl::vector<
boost::msm::front::Row<Init, boost::msm::front::none, State1>
> { };
using initial_state = InitState;
};
using Fsm = boost::msm::back::state_machine<FsmDef>;
Fsm fsm;
我如何构建fsm
并初始化私有数据FsmDef
。 State1也是一样。