Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

util::EventListener< T > Class Template Reference

#include <Event.h>

Inheritance diagram for util::EventListener< T >:

util::Object List of all members.

Detailed Description

template<class T>
class util::EventListener< T >

An interface for classes that are going to listen events from an event source.

An event can be of any type, and it is wise to write a custom event class for each event listener type to avoid confusion. If, for example, two event sources fire int events, then the listeners may be confused. Possible confusions can be solved by inspecting the source of the event, but this is not an elegant solution.


Public Methods

virtual void eventOccured (EventSource< T > *source, const T &event)=0
 Called by EventSource whenever an event occurs.


Member Function Documentation

template<class T>
virtual void util::EventListener< T >::eventOccured EventSource< T > *    source,
const T &    event
[pure virtual]
 

Called by EventSource whenever an event occurs.

All registered listeners will be notified with the source attribute set to the source of the event.

Parameters:
source  the source of the event. Helps in avoiding possible confusions with similar event types.
event  the event that was just fired

Implemented in FeatureSelector< T, I, C >.


The documentation for this class was generated from the following file:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.