Page 1 of 1

Questions about design and components...

Posted: Tue Jul 19, 2005 20:10
by kristian
Hello,
After taking a look at the CEGUI event system which by the way looks alot better than the old implementation I came up with a cuple of questions...


What is RefPtr used for ? Is it a "SmartPointer" class ?

Wouldnt it be more appropriate to call the class Event for EventSlot ? since its actually doesnt represent a single event type or definition but rather a collection of bound subscripers ?

How do I unsubscripe to an event in a event set without keeping track of alot of "Connection" instances which really should be the responsebility of the EventSet and the EventSlot it self.

- Kristian

Re: Questions about design and components...

Posted: Wed Jul 20, 2005 08:38
by CrazyEddie
Yes, RefPtr is basically a smart pointer. It's used within the Connection objects that you can pass about.

The Event name is now very old. It may or may not have been the 'best' name, but it is what it is. There is no intention of totally breaking 17 months worth of client code to change this now ;)

When you subscribe to an event, you are returned an Event::Connection object. You can use this to unsubscribe.