Questions about design and components...

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

User avatar
kristian
Just popping in
Just popping in
Posts: 12
Joined: Wed Apr 13, 2005 17:25

Questions about design and components...

Postby kristian » Tue Jul 19, 2005 20:10

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Questions about design and components...

Postby CrazyEddie » Wed Jul 20, 2005 08:38

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.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 8 guests