|
Boost Users : |
From: Andre Massing (massing_at_[hidden])
Date: 2008-04-07 04:10:54
Hi,
On 2008-04-07, Andreas Huber wrote :
> >> Have you read
> >> <http://www.boost.org/doc/libs/1_35_0/libs/statechart/doc/faq.html#HideI
> >>nne rWorkings>?
> >
> > Yes, I read it before but so far I haven't been able to link this to my
> > problem. Unfortunately it's not clear to me how the faq answer can be
> > applied
> > to give an inner state reaction access to an outer state transit function
> > without declaring the latter to be public.
>
> Sorry, I misread your original post. Indeed, the FAQ item does not apply to
> your problem. I can't think of any good way how you could declare
> transition actions non-public.
> I'm wondering why you'd want to do so? If you have applied the pattern
> described in the FAQ item, FSM clients will never see any of the state
> classes with the public transition actions, right?
Hmm, sorry, but this point is still not clear to me. Using this pattern, what
keeps the client from directly using a public transit function in the fsm? To
enforce capsulation of the inner work, the client should only be able to
invoke the fsm by events, not by anything else. Probably I am missing the
point, but as I said I am not a C++ master at all.
Regards and thanks for the fast replies!
Andre
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