Boost logo

Boost Users :

From: JD (jean.daniel.michaud_at_[hidden])
Date: 2007-04-06 15:22:04


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


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