Ignore:
Timestamp:
Dec 13, 2011, 9:46:12 AM (14 years ago)
Author:
Frederik Heber <heber@…>
Children:
2c11c1
Parents:
75d156
git-author:
Frederik Heber <heber@…> (12/02/11 10:05:36)
git-committer:
Frederik Heber <heber@…> (12/13/11 09:46:12)
Message:

Observable::signOn() now just needs channelno (enum) and not Notification_ptr.

  • this makes life a bit easier and allows for relaying notifications.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Patterns/Observer/Observable.cpp

    r75d156 r40f2e6  
    273273}
    274274
    275 void Observable::signOn(Observer *target, Notification_ptr notification) const
    276 {
     275void Observable::signOn(Observer *target, size_t channelno) const
     276{
     277  Notification_ptr notification = getChannel(channelno);
    277278  notification->addObserver(target);
    278279}
    279280
    280 void Observable::signOff(Observer *target, Notification_ptr notification) const
    281 {
     281void Observable::signOff(Observer *target, size_t channelno) const
     282{
     283  Notification_ptr notification = getChannel(channelno);
    282284  notification->removeObserver(target);
    283285}
Note: See TracChangeset for help on using the changeset viewer.