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.hpp

    r75d156 r40f2e6  
    7474   * Sign on for specialized notifications
    7575   */
    76   virtual void signOn(Observer *target, Notification_ptr notification) const;
     76  virtual void signOn(Observer *target, size_t channelno) const;
    7777
    7878  /**
    7979   * Stop receiving a specialized notification
    8080   */
    81   virtual void signOff(Observer *target, Notification_ptr notification) const;
     81  virtual void signOff(Observer *target, size_t channelno) const;
    8282
    8383  /**
     
    146146#define PASTE_HELPER(a,b) a ## b
    147147#define OBSERVE Observable::_Observable_protector PASTE(_scope_obs_protector_,__LINE__)(this)
    148 #define NOTIFY(channelno) do{const ChannelMap::const_iterator iter=NotificationChannels.find(this);ASSERT(iter!=NotificationChannels.end(),"NOTIFY() - channel not found.");Observable::enque_notification_internal(this,iter->second->getChannel(channelno));}while(0)
     148#define NOTIFY(channelno) do{Observable::enque_notification_internal(this,NotificationChannels[this]->getChannel(channelno));}while(0)
    149149#define LOCK_OBSERVABLE(observable) Observable::_Observable_protector PASTE(_scope_obs_protector_,__LINE__)(&(observable))
    150150
Note: See TracChangeset for help on using the changeset viewer.