Hi there,
having tested Boost.MSM, I'm pretty happy with it.
It's interesting, in that it seems to handle all states in a static table.
No "new" operator etc.
Since
there is no "new" and all is static, I cannot use the runtime, to
specialize my transitions. So instead, I have to use templates!
Unfortunately I'm not a template master, and the compiler is giving me an error.
Here's what I'm trying:
template <typename EventT>
struct Machine_ : public msm::front::state_machine_def<Machine_<EventT> > {
// ...
struct transition_table : mpl::vector<
g_row<StateInitial, EventT, StateEven, &Machine_<EventT>::guardToEven>,
g_row<StateInitial, EventT, StateOdd, &Machine_<EventT>::guardToOdd>,
g_row<StateInitial, EventT, StateFloat, &Machine_<EventT>::guardToFloat>,
g_row<StateEven, EventT, StateEven, &Machine_<EventT>::guardToEven>,
g_row<StateEven, EventT, StateOdd, &Machine_<EventT>::guardToOdd>,
g_row<StateEven, EventT, StateFloat, &Machine_<EventT>::guardToFloat>,
g_row<StateOdd, EventT, StateEven, &Machine_<EventT>::guardToEven>,
g_row<StateOdd, EventT, StateOdd, &Machine_<EventT>::guardToOdd>,
g_row<StateOdd, EventT, StateFloat, &Machine_<EventT>::guardToFloat>,
g_row<StateFloat, EventT, StateEven, &Machine_<EventT>::guardToEven>,
g_row<StateFloat, EventT, StateOdd, &Machine_<EventT>::guardToOdd>,
g_row<StateFloat, EventT, StateFloat, &Machine_<EventT>::guardToFloat>
>{};
// ...
}