|
Boost Users : |
From: Andreas Huber (ahd6974-spamboostorgtrap_at_[hidden])
Date: 2007-12-19 18:02:18
Hi Sean
> I would like to implement a null-op in_state_reaction - The
> in_state_reaction template requires a action argument whereas the
> transition to self doesn't
It's kind of an oversight that in_state_reaction does not define defaults
for its last two template parameters. I'll change that for 1.36
(unfortunately no new functionality can go in 1.35).
Usually, a state_machine can ignore an event simply by not defining a
reaction for it, which is also the reason why in_state_reaction currently
requires a function to execute. However, all ignored events will be handed
to state_machine<>::unconsumed_event, which sometimes is not what you want.
> Which is the preferred method ?
Since transition to self will always exit and reenter the state, the only
correct way is with in_state_reaction.
HTH,
-- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net