Andreas Huber wrote:

Unfortunately, I don't have much experience with anything else than MS
compilers. I will try to port to gcc, but I'll probably need help for
not-so-conforming compilers like Borland.

I have experience with GCC, MS and Borland if you need help porting the code.


[snip]
void Pump::Start()
{
   initiate< Idle >(); // ***** here *****
}

Wouldn't this complicate the code that the programmer has to write, whereas your version was simpler to implement. (Just my opinion).


I did consider polymorphic events but I wasn't able to make double dispatch
work *automatically* (i.e. without requiring the user to write parts of the
dispatch code themselves).

I personally need polymorphic events only very rarely. Whenever I did, I was
always able to change event granularity so that the need would go away. In
your case that would mean to get rid of MouseUpEvent and MouseDownEvent
alltogether and add the information to MouseEvent:

Does the library/code generator you're currently using work with
polymorphic events? Is not having polymorphic events a showstopper for you?
If yes, I would be interested in a as-real-world-as-possible example.

I'm not sure on this, but would Windows-based code that redirects events to a Window class be a polymorphic event, e.g.


  class WindowBase
  {
     public:
        virtual void Paint( win::api::DC & hDC );
        // ...
  };
  class MyGUIWindow: public WindowBase
  {
     public:
        void Paint( win::api::DC & hDC ); // custom window graphics
  };

Not sure how you would integrate this with a FSM though!

Regards,
Reece

_________________________________________________________________
On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to