Crazy Eddie's GUI System  0.8.4
CEGUI::BoundSlot Class Reference

Class that tracks a SubscriberSlot, its group, and the Event to which it was subscribed. This is effectively what gets returned from the calls to the Event::subscribe members, though BoundSlot is always wrapped in a reference counted pointer. When a BoundSlot is deleted, the connection is unsubscribed and the SubscriberSlot is deleted. More...

+ Inheritance diagram for CEGUI::BoundSlot:
+ Collaboration diagram for CEGUI::BoundSlot:

List of all members.

Public Types

typedef unsigned int Group

Public Member Functions

 BoundSlot (Group group, const SubscriberSlot &subscriber, Event &event)
 Constructor.
 BoundSlot (const BoundSlot &other)
 Copy constructor.
 ~BoundSlot ()
 Destructor.
bool connected () const
 Returns whether the slot which this object is tracking is still internally connected to the signal / event mechanism.
void disconnect ()
 Disconnects the slot. Once disconnected, the slot will no longer be called when the associated signal / event fires. There is no way to re-connect a slot once it has been disconnected, a new subscription to the signal / event is required.
bool operator== (const BoundSlot &other) const
 Equality operator.
bool operator!= (const BoundSlot &other) const
 Non-equality operator.

Friends

class Event

Detailed Description

Class that tracks a SubscriberSlot, its group, and the Event to which it was subscribed. This is effectively what gets returned from the calls to the Event::subscribe members, though BoundSlot is always wrapped in a reference counted pointer. When a BoundSlot is deleted, the connection is unsubscribed and the SubscriberSlot is deleted.


Constructor & Destructor Documentation

CEGUI::BoundSlot::BoundSlot ( Group  group,
const SubscriberSlot subscriber,
Event event 
)

Constructor.

Parameters:
groupThe subscriber group this slot is attached to.
subscriberThe actual slot object that is controlling this connection binding.
eventThe Event object to which the subscribed slot is attached.

Member Function Documentation

Returns whether the slot which this object is tracking is still internally connected to the signal / event mechanism.

Returns:
  • true to indicate that the slot is still connected.
  • false to indicate that the slot has been disconnected.

Disconnects the slot. Once disconnected, the slot will no longer be called when the associated signal / event fires. There is no way to re-connect a slot once it has been disconnected, a new subscription to the signal / event is required.

Returns:
Nothing.
bool CEGUI::BoundSlot::operator!= ( const BoundSlot other) const

Non-equality operator.

Parameters:
otherThe BoundSlot to compare against.
Returns:
  • true if the BoundSlot objects represent different connections.
  • false if the BoundSlot objects represent the same connection.
bool CEGUI::BoundSlot::operator== ( const BoundSlot other) const

Equality operator.

Parameters:
otherThe BoundSlot to compare against.
Returns:
  • true if the BoundSlot objects represent the same connection.
  • false if the BoundSlot objects represent different connections.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends