Source-highlight Library
Public Member Functions | Private Attributes | List of all members
srchilite::EventGenerator< EventListener, EventType > Class Template Reference

A generic event generator, for listeners of type EventListener and events of type EventType. More...

#include <eventgenerator.h>

Collaboration diagram for srchilite::EventGenerator< EventListener, EventType >:
Collaboration graph
[legend]

Public Member Functions

void  addListener (EventListener *listener)
 
void  removeListener (EventListener *listener)
 
bool  hasListeners () const
 
void  notify (const EventType &event)
  Notifies all listeners of a specific event. More...
 

Private Attributes

std::list< EventListener * >  listeners
  the list of listeners
 

Detailed Description

template<class EventListener, class EventType>
class srchilite::EventGenerator< EventListener, EventType >

A generic event generator, for listeners of type EventListener and events of type EventType.

EventListener must implement the method notify(const EventType &)

Member Function Documentation

template<class EventListener, class EventType>
void srchilite::EventGenerator< EventListener, EventType >::notify ( const EventType &  event )
inline

Notifies all listeners of a specific event.

Parameters
event the event

The documentation for this class was generated from the following file:
  • /home/bettini/work/source-highlight/src-highlite/lib/srchilite/eventgenerator.h

AltStyle によって変換されたページ (->オリジナル) /