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)
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();
224 typedef std::multimap<Group, Connection, std::less<Group>
225 CEGUI_MULTIMAP_ALLOC(Group, Connection)> SlotContainer;
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:53
CEGUI::SubscriberSlot Subscriber
Subscriber object type. This is now just a typedef to SubscriberSlot, the use of the name Event::Subs...
Definition: Event.h:76
Event::Connection wrapper that automatically disconnects the connection when the object is deleted (o...
Definition: Event.h:92
const String d_name
Name of this event.
Definition: Event.h:227
virtual ~Event()
Destructor for Event objects. Note that this is non-virtual and so you should not sub-class Event.
RefCounted< BoundSlot > Connection
Connection object. This is a thin 'smart pointer' wrapper around the actual BoundSlot that represents...
Definition: Event.h:68
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...
Definition: MemoryAllocatedObject.h:110
const String & getName(void) const
Return the name given to this Event object when it was created.
Definition: Event.h:145
unsigned int Group
Type for a subscriber group. You can use the subscriber group to order calls to multiple subscribers....
Definition: Event.h:84
SlotContainer d_slots
Collection holding ref-counted bound slots.
Definition: Event.h:226
Connection subscribe(const Subscriber &slot)
Subscribes some function or object to the Event.
void operator()(EventArgs &args)
Fires the event. All event subscribers get called in the appropriate sequence.
bool isValid() const
Return whether the wrapped pointer is valid. i.e. that it is not null.
Definition: RefCounted.h:165
void unsubscribe(const BoundSlot &slot)
Disconnects and removes the given BoundSlot from the collection of bound slots attached to this Event...
Connection subscribe(Group group, const Subscriber &slot)
Subscribes some function or object to the Event.
Defines an 'event' which can be subscribed to by interested parties.
Definition: Event.h:59
String class used within the GUI system.
Definition: String.h:64
Event(const String &name)
Constructs a new Event object with the specified name.
Class that tracks a SubscriberSlot, its group, and the Event to which it was subscribed....
Definition: BoundSlot.h:46
Base class used as the argument to all subscribers Event object.
Definition: EventArgs.h:51