|
Boost Users : |
Subject: Re: [Boost-users] [statechart] Unhandled events
From: Oleg Smolsky (oleg_at_[hidden])
Date: 2010-10-07 14:55:00
On 2010-10-07 06:53, Igor R wrote:
>> My question is as follows - is it possible to define some kind of "catch
>> all" handler in the OuterSt?
> Sure. Just define unconsumed_event() member function in your state machine.
>
> http://www.boost.org/doc/libs/1_44_0/libs/statechart/doc/reference.html#unconsumed_event
Ah, "unconsumed" was the key word :) Thank you, it works well.
P.S. just for archiving purposes, the point here is to add a handler to
the actual state machine class/struct:
struct StateMachine : sc::state_machine<StateMachine, OuterSt>
{
void unconsumed_event(const sc::event_base &)
{
log_error_xxx("Lost an event in the state machine...");
}
};
Oleg.
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