Ignore:
Timestamp:
Dec 13, 2011, 12:02:21 PM (14 years ago)
Author:
Frederik Heber <heber@…>
Children:
3324cf
Parents:
d85532
git-author:
Frederik Heber <heber@…> (12/02/11 13:13:44)
git-committer:
Frederik Heber <heber@…> (12/13/11 12:02:21)
Message:

Relay can now also relay notifications.

  • NOTE: We do not yet notify the Observables, whose update() we combine, when the Relay is destroyed. They have to signOff before by themselves (or by some other means, e.g. be destroyed before.).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Patterns/Observer/Relay.hpp

    rd85532 rb760ac5  
    3636  virtual ~Relay();
    3737
    38 //  Notification_ptr getChannel(size_t no) const;
     38  virtual void signOn(Observer *target, PriorityLevel priority = Observable::PriorityDefault) const;
     39
     40  virtual void signOff(Observer *target) const;
     41
     42  virtual void signOn(Observer *target, size_t channelno) const;
     43
     44  virtual void signOff(Observer *target, size_t channelno) const;
    3945
    4046protected:
    4147  virtual void update(Observable *publisher);
     48  virtual void recieveNotification(Observable *publisher, Notification_ptr notification);
    4249  virtual void subjectKilled(Observable *publisher);
    4350
     
    4754  //!> Current peer that called last update on us, to be passed on to Observers
    4855  Observable *Updater;
    49 //protected:
    50 //
    51 //  Channels *NotificationChannels;
    52 //
    5356};
    5457
Note: See TracChangeset for help on using the changeset viewer.