Changeset bc2698 for src/Patterns/Observer.cpp
- Timestamp:
- Dec 13, 2011, 9:43:39 AM (14 years ago)
- Children:
- e2e035e
- Parents:
- e7352a5
- git-author:
- Frederik Heber <heber@…> (12/01/11 09:09:18)
- git-committer:
- Frederik Heber <heber@…> (12/13/11 09:43:39)
- File:
-
- 1 edited
-
src/Patterns/Observer.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Patterns/Observer.cpp
re7352a5 rbc2698 43 43 std::map<Observable*,std::set<Notification*> > Observable::notifications; 44 44 set<Observable*> Observable::busyObservables; //!< Set of Observables that are currently busy notifying their sign-on'ed Observers 45 Observable::ChannelMap Observable::NotificationChannels; //!< Map of Observables to their Channels. 45 46 46 47 /** Attaching Sub-observables to Observables. … … 278 279 Notification_ptr Observable::getChannel(size_t no) const 279 280 { 280 ASSERT(NotificationChannels != NULL, 281 ChannelMap::iterator iter = NotificationChannels.find(const_cast<Observable *>(this)); 282 ASSERT(iter != NotificationChannels.end(), 283 "Observable::getChannel() - we do not have a channel in NotificationChannels."); 284 const Channels *OurChannel = iter->second; 285 ASSERT(OurChannel != NULL, 281 286 "Observable::getChannel() - observable has no channels."); 282 return NotificationChannels->getChannel(no);287 return OurChannel->getChannel(no); 283 288 } 284 289
Note:
See TracChangeset
for help on using the changeset viewer.
