From: Andreas Huber (ahd6974-spamgroupstrap_at_[hidden])
Date: 2005-10-02 06:12:27
Andy Little wrote:
>>> I was wondering if it might be useful to decode raw gui events eg
>>> "some timed sequence of raw mouse actions" = "left button
>>> doubleclick event"?
>> Maybe I'm underestimating the task but such an FSM seems to be simple
>> enough (flat and ~4 states?) that it could be implemented from
>> scratch in say 2 hours? I guess you wouldn't get much leverage from
>> Boost.Statechart here, which is more geared towards medium-large size
> Ok ;-) I dont have much experience of fsms . I thought the system
> might be describable in a one line fsm somehow.
One line definitely won't do it (if you care about code formatting :-)),
at least not with any of the FSM libs I know. With Boost.Statechart I
guess you could do in with 30, hugely depending on the exact semantics
you require. The simplest from scratch implementation (doubly nested
switch-case statement) wouldn't be much longer...
-- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk