Crazy Eddie's GUI System
0.8.7
|
27 #ifndef _CEGUIEvent_h_
28 #define _CEGUIEvent_h_
30 #include "CEGUI/String.h"
31 #include "CEGUI/BoundSlot.h"
32 #include "CEGUI/SubscriberSlot.h"
33 #include "CEGUI/RefCounted.h"
38 # pragma warning(push)
39 # pragma warning(disable : 4251)
57 class CEGUIEXPORT Event :
58 public AllocatedObject<Event>
68 typedef RefCounted<BoundSlot> Connection;
84 typedef unsigned int Group;
91 class ScopedConnection :
public Connection
102 d_connection(connection)
107 d_connection = connection;
111 bool connected()
const
113 return d_connection.isValid() ? d_connection->connected() :
false;
118 if (d_connection.isValid()) d_connection->disconnect();
145 const String& getName(
void)
const
164 Connection subscribe(
const Subscriber& slot);
185 Connection subscribe(Group group,
const Subscriber& slot);
219 Event& operator=(
const Event&)
224 typedef std::multimap<Group, Connection, std::less<Group>
225 CEGUI_MULTIMAP_ALLOC(Group, Connection)> SlotContainer;
226 SlotContainer d_slots;
232 #if defined(_MSC_VER)
233 # pragma warning(pop)
236 #endif // end of guard _CEGUIEvent_h_
SubscriberSlot class which is used when subscribing to events.
Definition: SubscriberSlot.h:75
RefCounted< BoundSlot > Connection
Connection object. This is a thin 'smart pointer' wrapper around the actual BoundSlot that represents...
Definition: Event.h:116
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
void disconnect()
Disconnects the slot. Once disconnected, the slot will no longer be called when the associated signal...
Defines an 'event' which can be subscribed to by interested parties.
Definition: Event.h:81
String class used within the GUI system.
Definition: String.h:88
Class that tracks a SubscriberSlot, its group, and the Event to which it was subscribed....
Definition: BoundSlot.h:68
Base class used as the argument to all subscribers Event object.
Definition: EventArgs.h:73