|
Boost Users : |
From: Andreas Huber (ahd6974-spamboostorgtrap_at_[hidden])
Date: 2007-04-14 07:33:23
Jeffrey Holle wrote:
> OK, I've "succeeded" to get a transition handler to compile, but only
> if
> if I use a method defined in another class. When I attempt a
> reference
> a local method,
I assume with "local method" you mean a method that is a member of the
same class that also defines the transition in its reactions typedef.
[snip]
> Can one reference local methods in a transition template?
No, you cannot. The very semantics UML state machines forbid you to do
that. If you read everything under
<http://www.boost-consulting.com/boost/libs/statechart/doc/tutorial.html#TransitionActions>
then this should become abundantly clear. That is, at the point where
the transition action should be called, the state in question has
already been exited (the state object is destroyed).
> If not, will I be able to employ the content<> template in a state
> machine method to access the state object content which has the data?
I assume you mean the context<> template. If so then the answer is no.
As the name suggests this template is intended to give you access to a
context of a given state object.
Could you please explain exactly what you want to achieve? The code you
have so far with a few comments would go a long way.
-- 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