Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2008-08-18 13:07:53


Thomas Klimpel wrote:
> Andrey Semashev wrote:
>> I've attached another
>> version of the example with a transition map (see
>> usb_fsm_transition_based.cpp). Note that all transition logic is
>> encapsulated in transitions and all processing is in states.
>
> I'm unable to see how the "transition map" enters into the code. You
> make a typedef
>
> typedef mpl::vector<
> ...
>> ::type Transitions;
>
> but I cannot see "Transitions" used anywhere in the code. Is there some
> magic that the included headers use this typedef? That would be scary to
> me.

Sorry, I missed that. The transition table should be provided as the
third template parameter for the state machine.

  fsm::state_machine< StateList, void, Transitions > machine;


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