next up previous contents
Next: EventFilter Up: Classes Previous: Publisher   Contents

Subscriber

Classe which connect to a Publisher in order to receives Events of a certain type, by the use of Listener. Any Subscriber interested in a given Event from a Publisher, can subscribe for receiving Events by using an appropriate Listener.
Its interface is:
  class Subscriber {
  public:
    Listener::ID add_listener(Listener* l) ;
    Listener* get_listener_with_id(const Listener::ID&) const ;
    bool remove_listener_with_id(const Listener::ID& id) ;
    void remove_all_listener() ;
    void add_event_filter(Listener::ID, EventFilter*) ;
    void add_event_filter(EventFilter*) ;
    void remove_all_event_filters() ;
    void block_events() ;
    void unblock_events() ;
  } ;
and the related macro is:
  igs_add_listener(PUBLISHER, LISTENER, FUNCTION)



Frantz Maerten 2006-01-30