C
Christopher
The observer pattern itself is easy enough. I've implemented it using
a Event that contains data for any Event type I forsee my application
using. My problem is I don't want one and only one general purpose
type of Event. I want to write my design in such a way that more Event
Types can be created and used down the road as needed. How can you
design the Events in such a way that more can be handled later by the
same Observer and Subject classes when they don't know what your
Events look like right now?
a Event that contains data for any Event type I forsee my application
using. My problem is I don't want one and only one general purpose
type of Event. I want to write my design in such a way that more Event
Types can be created and used down the road as needed. How can you
design the Events in such a way that more can be handled later by the
same Observer and Subject classes when they don't know what your
Events look like right now?