|
Boost Users : |
From: Andreas Huber (ahd6974-spamboostorgtrap_at_[hidden])
Date: 2007-07-24 04:32:15
Hi
mbrodeur65 <martin.brodeur <at> adacelcanada.com> writes:
> I'm looking for a solution to serialize boost::statechart objects. I'm aware
> that this feature is on the statechart library todo list but was wondering
> if there are any workaround to achieve this with the latest boost release
> (1.34) ?
For non-orthogonal machines, saving the state is relatively easily done by
inspecting the current state configuration with the public interface
(state_machine<>.state_begin() & state_machine<>.state_end()). Loading is more
cumbersome as you need to be able to go to the previously stored state after
initiation. The only way to do this at the moment is to introduce special
transitions.
Not really pretty and a lot of grunt work, I know, but that's the current state
of affairs regarding serialization. IIRC, the serialization library still does
not offer a way to serialize objects that have an overloaded operator new. This
however would be an inevitable prerequisite for a decent statechart
serialization implementation.
HTH,
-- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.
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