Boost logo

Boost Users :

From: Commander Pirx (CmdPirx_at_[hidden])
Date: 2008-03-03 05:56:17


I'm using the Statechart Library in conjunction with the really exciting
Asio Library to set up a communication server. There is a very helpful
documentation of the Statechart Library too. But one topic is puzzling me:
How to to get data into the state machine?

Here is an simple example: Each session object of the server has two states:
signed-off and authorized. Receiving a login event leads to a transition to
the authorized state. Thats pretty easy. But the login data (stored in the
login event) got lost. I can hold this data in the state machine itself
(outermost_context()). Or I can use a pseudo event to forward this data to
the authorized state. But I'm looking for a nifty way to avoid this
overhead. I like this concept of state-local storage very much. But I'm not
shure about how to use it.


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