Hi,
I have noticed a strange problem with event processing with msm.
My events derive publicly from a base events struct like this:
struct BaseEvent { virtual ~BaseEvent() {} };
struct ConcreteEvent : public BaseEvent {};
I my FSM i have a transition defined for ConcreteEvent,
When I do this :
void foo(const BuddyEvent& event)
{
fsm->process_event(event); // event is of type ConcreteEvent
}
The fsm fires a no_transition , and I see a message saying no transition for ConcreteEvent in state X (state X has a valid transition for ConcreteEvent)
However this succeeds:
void foo(const BuddyEvent& event)
{
fsm->process_event(ConcreteEvent(0);
}
I am using boost-1.49 and the boost msm library that comes bundled with this.
So my question is, why is msm not able to generate a valid transition for a concrete event passed as a reference to its base tyoe.
Thanks!