"Bill Clark" schrieb im Newsbeitrag news:179b0d0d0907090954v5713336j2a6577f4c354fcde@mail.gmail.com...
Is there any way to partition a state machine using boost::statechart such that the main state machine is in one dll, and its substates (and possibly their substates) are in separate dll's?
It would seem that this would create a cyclic dependency. Suppose you have e.g. a simple statechart called MyStatechart containing an initial state State1 which transitions to State2 in response to some event. Is it possible to implement MyStatechart and State1 in MyStatechart.dll, and State2 in State2.dll?
Since the code for State1 will need to reference State2 (in order to transition to it), MyStatechart.dll will have a dependency on State2.dll. But since State2 is contained in MyStatechart, its type will have to look something like
struct State2: sc::state
{
//...
};
which means that State2.dll will have a dependency on MyStatechart.dll.
Is it possible to avoid this cycle?
Thanks for any help,
Bill
There is a topic in the statechart tutorial http://www.boost.org/doc/libs/1_39_0/libs/statechart/doc/tutorial.html#Sprea...
Which covers a similiar topic. Perhaps you can modify your architecture and work with nested state machines.
Pirx