6 Apr
2007
6 Apr
'07
7:22 p.m.
Hi, Here some code: //snippet on template< class MostDerived > struct EventA : sc::event< MostDerived > { virtual std::string name() { return "unnamed event"; } }; struct EventB : public EventA< EventB > { std::string name() { return "EventB"; } }; struct MyMachine : sc::state_machine< MyMachine, Whatever > { void unconsumed_event( const sc::event_base & evt ) { // How can I display a message here with the event name? } }; //snippet off So the objective is to display the event name returned by the 'name' function when an event is unconsumed. I have tried some way like using dynamic_type and static_type but no luck... Any idea? Thank you. JD