30#include "CEGUI/String.h"
31#include "CEGUI/BoundSlot.h"
32#include "CEGUI/SubscriberSlot.h"
33#include "CEGUI/RefCounted.h"
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;
Definition MemoryAllocatedObject.h:110
Class that tracks a SubscriberSlot, its group, and the Event to which it was subscribed....
Definition BoundSlot.h:46
void disconnect()
Disconnects the slot. Once disconnected, the slot will no longer be called when the associated signal...
Base class used as the argument to all subscribers Event object.
Definition EventArgs.h:51
Event::Connection wrapper that automatically disconnects the connection when the object is deleted (o...
Definition Event.h:92
Defines an 'event' which can be subscribed to by interested parties.
Definition Event.h:59
virtual ~Event()
Destructor for Event objects. Note that this is non-virtual and so you should not sub-class Event.
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
void operator()(EventArgs &args)
Fires the event. All event subscribers get called in the appropriate sequence.
SlotContainer d_slots
Collection holding ref-counted bound slots.
Definition Event.h:226
const String & getName(void) const
Return the name given to this Event object when it was created.
Definition Event.h:145
const String d_name
Name of this event.
Definition Event.h:227
RefCounted< BoundSlot > Connection
Connection object. This is a thin 'smart pointer' wrapper around the actual BoundSlot that represents...
Definition Event.h:68
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.
Event(const String &name)
Constructs a new Event object with the specified name.
Connection subscribe(const Subscriber &slot)
Subscribes some function or object to the Event.
unsigned int Group
Type for a subscriber group. You can use the subscriber group to order calls to multiple subscribers....
Definition Event.h:84
Simple, generic, reference counted pointer class. This is primarily here for use by the Events system...
Definition RefCounted.h:43
bool isValid() const
Return whether the wrapped pointer is valid. i.e. that it is not null.
Definition RefCounted.h:165
String class used within the GUI system.
Definition String.h:64
SubscriberSlot class which is used when subscribing to events.
Definition SubscriberSlot.h:53
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1