Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ONE::util::TextDispatcher Class Reference

Inheritance diagram for ONE::util::TextDispatcher:

Inheritance graph
[legend]
List of all members.

Detailed Description

TextEvent dispatcher

Author:
Daniel Seibert


Public Types

typedef TextListenerLPtr

Public Member Functions

void addTextListener (const LPtr &l)
 EventDispatcher ()
void fireEvent (TextEvent &e) const
 notifies all registered listeners
bool isMuted () const
 reflects this dispatcher's muted state.
void removeTextListener (const LPtr &l)
void setMuted (bool mute)
 mutes or un-mutes the dispatcher

Protected Member Functions

void add (const LPtr &l)
 registers a listener
void remove (const LPtr &l)
 de-registers a listener.


Member Typedef Documentation

typedef TextListener * ONE::util::EventDispatcher< TextEvent , TextListener , struct TextRelay >::LPtr [inherited]
 


Member Function Documentation

void ONE::util::EventDispatcher< TextEvent , TextListener , struct TextRelay >::add const LPtr l  )  [protected, inherited]
 

registers a listener

Parameters:
l a listener

void ONE::util::TextDispatcher::addTextListener const LPtr l  )  [inline]
 

ONE::util::EventDispatcher< TextEvent , TextListener , struct TextRelay >::EventDispatcher  )  [inherited]
 

void ONE::util::EventDispatcher< TextEvent , TextListener , struct TextRelay >::fireEvent TextEvent e  )  const [inherited]
 

notifies all registered listeners

The listeners are called in the order in which they were added.
This function is provided primarily for use by subclasses. However, it may also be called from the outside in order to inject events into the system. Note that great care should be taken when doing so. For example, listeners generally rely on the event's source being identical to the instance that passes them around, i.e. this event dispatcher.

Parameters:
e the event to forward to each listener

bool ONE::util::EventDispatcher< TextEvent , TextListener , struct TextRelay >::isMuted  )  const [inherited]
 

reflects this dispatcher's muted state.

Returns:
true if the dispatcher is muted, false otherwise

void ONE::util::EventDispatcher< TextEvent , TextListener , struct TextRelay >::remove const LPtr l  )  [protected, inherited]
 

de-registers a listener.

This listener will no longer notify l of events, unless l is registered more than once. If so, a call to this function will only remove the first occurence of l.

Parameters:
l a listener

void ONE::util::TextDispatcher::removeTextListener const LPtr l  )  [inline]
 

void ONE::util::EventDispatcher< TextEvent , TextListener , struct TextRelay >::setMuted bool  mute  )  [inherited]
 

mutes or un-mutes the dispatcher

Muted dispatchers no longer notify their listeners.


Generated on Wed Sep 7 19:03:33 2005 for ONEngine by  doxygen 1.4.3