Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2008-08-06 13:03:27


Chris Knight wrote:
> On Wednesday 06 August 2008 9:59:43 am Andrey Semashev wrote:
>> I'm not sure what you mean by that "registering". The library does one
>> event dispatching if it is known at compile time that no entry in the
>> transition map will be triggered. If a transition map entry is
>> triggered, then two dispatches are done - one to deliver event to the
>> transition handler, and second to deliver the event to the active state.
>> In any case, dispatching is very efficient and is basically a call on a
>> function pointer that is acquired from an array by index.
>
> I was referring to deferred event dispatching. I see on another thread that
> Boost.FSM does not support such a concept. I was simply noting that any
> such implementation can/should be done without the use of rtti/virtuals.

I don't see the connection between rtti/virtuals and event deferring.
Anyway, in case of Boost.FSM virtual functions are only used for enter
state handlers in case of run-time version of state switching. Type info
is used for convenience only - it provides default state names and
diagnostic information in case of exceptions.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk