
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.