Boost logo

Boost :

Subject: [boost] [msm]omitting region id at the entry pseudo state
From: Takatoshi Kondo (redboltz_at_[hidden])
Date: 2012-03-04 04:18:55


Now, I'm using Boost.Msm (Version1.49.0).
I have a question about a transition behavior when I omit a region id
at the entry pseudo state.

The document said that when we use the explicit entry, if the state
machine satisfied the conditions below, we can omit the region id.
" Thanks to the mpl_graph library you can also omit to provide the
region index and let MSM find out for you. The are however two points
to note:
 - MSM can only find out the region index if the explicit entry state
is somehow connected to an initial state through a transition, no
matter the direction.
 - There is a compile-time cost for this feature. "

Because of the discussion below, I believe that this rule can also be
applied to entry pseudo states.

However, when I omitted the region id, the state machine transitioned
to the SubState1.
struct Entry1:msmf::entry_pseudo_state<> {};

If I provided the region id, the state machine transitioned to the SubState2.
struct Entry1:msmf::entry_pseudo_state<0> {};

See entry_pt_omit_rid.cpp (Attached file)

As far as I can understand, Entry1 and SubState1, initial_state, are
connected. (See fig.png)

Is there any reason that I can't omit the region id in this case?



Boost list run by bdawes at, gregod at, cpdaniel at, john at