Boost logo

Boost Users :

From: Mick Hollins (mick_at_[hidden])
Date: 2005-10-15 20:33:50


Apologies if this has been discussed before, but I couldn't find any mention of it:

I am currently using the history facility of boost::fsm. I've discovered
that when I re-enter a state, X, via a history transition I don't
actually re-enter the same instance of X that I was in before,
but instead enter a newly constructed instance of X.

I just checked the UML spec regarding history transitions and it
says that "Any necessary entry actions are performed", so given that
boost::fsm uses constructors to represent entry actions I guess a new instance
of X has to be constructed to ensure UML compliance.

My actual concern is the effect this has on the "coolness" of state-local-storage
(see http://boost-sandbox.sourceforge.net/libs/statechart/doc/faq.html#Whats_so_cool_about_state-local_storage)
It seems to me that state-local-storage, which I agree is generally cool, is
particularly un-cool (and bug-inducing) in the presence of history transitions.

I'm not sure what a good alternative is, but just thought I'd raise the discussion.

cheers,
mick

PS: does the history facility display the same semantics in boost::statechart?
I plan to move to statechart real soon now ...


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