
Andre Massing
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?
The fact that transition actions are members of simple_state<> subclasses. If you apply the pattern outlined in the FAQ item, none of these classes are visible to FSM clients. Looking at <http://www.boost.org/doc/libs/1_35_0/libs/statechart/doc/faq.html#HideInnerW... ings> you see that a client including StopWatch.hpp has *no* *clue* of the existence Running and Stopped classes. The client does know about the existence of the Active class but since it is only forward-declared, he does not have access to its member functions. Now, if you add a transition action for say the transition from Running to Stopped, you'd add a member function to the Active class in StopWatch.cpp, right? Regards, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.