Boost logo

Boost Users :

From: Oliver.Kowalke_at_[hidden]
Date: 2006-05-09 03:34:44

>Tim Milward wrote:
>> Johan Nilsson wrote:
>>> 1. For a state, is it possible to specify a method that will be
>>> called when an event with no defined handlers is received?
>> Interesting question. Can all events inherit from a common base
>> to which a state could define a (default) reaction, and override this
>> with reactions to specific event sub-classes?
>Should be possible from my point of view. Not sure how the framework
>handle that even though it sounds reasonable. It's a bit limiting
>and should be possible have support for in the library.

By default statechart ignores a event with no handlers in the
Statechart allows to catch the event by adding following function to
your state_machine class:

void unconsumed_event( sc::event_base const& ev)
{ ... }


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at