Boost logo

Boost Users :

From: Jarl Friis (jarl_at_[hidden])
Date: 2008-03-07 08:43:41


Hi.

Can anyone tell me how to query a state on an
asynchronous_state_machine?

The obvious answer would be to say use the state_downcast method
(which is inherited from state_machine. But in practise it seems
harder than so.

But opposed to state_machine, when using asynchronous_state_machine
the instance is not created explicitely, it is created implicitely by
the scheduler, like this: myMachine =
myEventHandler.create_processor<AsyncMachine>(); , hence there is no
handle to the state machine itself. All I have is a handle to the
processor (sc::fifo_scheduler<>::processor_handle ).

So is there a way to come from sc::fifo_scheduler<>::processor_handle
to AsyncMachine (which inherits sc:asynchronous_state_machine)?

Jarl


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