Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Phx::EventNotifier Class Reference

The EventNotifier is an entity that serves as a rallying point for clients that need notification of a particular event. More...

#include <PhxEventNotifier.h>

Inheritance diagram for Phx::EventNotifier:

Phx::NamedInterface Phx::LockedPtrInterface< NamedInterface > List of all members.

Public Member Functions

virtual void newListener (Listener *listener)=0
 Adds a listener to this notifier.
virtual void deleteListener (Listener *listener)=0
 Removes a listener from this notifier.
virtual void newEvent (void)=0
 Triggers a new event callback.

Static Public Attributes

static const NamedInterface::Type INTERFACE_TYPE
static const String INTERFACE_TYPE_NAME

Classes

class  Listener
 A Listener class that can be installed to receive notifications when the event represented by this notifier occurs. More...

Detailed Description

The EventNotifier is an entity that serves as a rallying point for clients that need notification of a particular event.

An EventNotifier is essentially a collection of listeners. The listeners are triggered when the EventNotifier's client calls newEvent().


Member Function Documentation

virtual void Phx::EventNotifier::deleteListener Listener listener  )  [pure virtual]
 

Removes a listener from this notifier.

Parameters:
listener The Listener that will be removed from this notifier.
This method is safely accessible by multiple, concurrent clients.

virtual void Phx::EventNotifier::newEvent void   )  [pure virtual]
 

Triggers a new event callback.

All of the listeners in this EventNotifier will be called back, in no particular order.

This method is safely accessible by multiple, concurrent clients. As a result, the EventNotifier is potentially a many-to-many notification system. However, one should never trigger an event notifier unless the behavior of doing so is documented. e.g., only the Core should ever trigger the start/end frame notifications, but several clients may trigger a Quit notification (perhaps more than one and simultaneously).

virtual void Phx::EventNotifier::newListener Listener listener  )  [pure virtual]
 

Adds a listener to this notifier.

Parameters:
listener A Listener that will be called back when the notifier is triggered by its client via newEvent().
This method is safely accessible by multiple, concurrent clients.


The documentation for this class was generated from the following file:
Generated on Mon Jul 10 19:45:29 2006 for Phoenix OSFS by  doxygen 1.4.2