Changeset 1c291d for src/CodePatterns/Observer/Channels.hpp
- Timestamp:
- Mar 18, 2013, 6:29:41 PM (13 years ago)
- Children:
- 3f30cc
- Parents:
- b9273a
- git-author:
- Frederik Heber <heber@…> (03/18/13 18:22:47)
- git-committer:
- Frederik Heber <heber@…> (03/18/13 18:29:41)
- File:
-
- 1 edited
-
src/CodePatterns/Observer/Channels.hpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/CodePatterns/Observer/Channels.hpp
rb9273a r1c291d 18 18 #include "CodePatterns/Observer/defs.hpp" 19 19 20 class Observable; 21 class Relay; 22 20 23 /** Channels aggregate all possible Notifications of an Observable. 21 24 * … … 23 26 * visible to the outside only. 24 27 * 28 * \note Channels::subjectKilled() needs to be called by owning Observable. 29 * It is passed on to Notification such that Observer that have only signed 30 * on to single channel still know when their observable has died. 25 31 */ 26 32 class Channels { … … 38 44 39 45 private: 46 //! grant Observable access to notifyAll() and subjectKilled() 47 friend class Observable; 48 //!> grant Relay access to notifyAll() 49 friend class Relay; 50 51 /** Informs channel subscribers about imminent dstor call. 52 * 53 * This is meant to be called from Observable only. 54 * Channels and Notifications are strictly attached to an Observable. Hence, 55 * it makes no sense to inform them on their own. Especially, neither has 56 * any knowledge on the publisher. 57 * 58 * \param *publisher Observable about to be destroyed 59 */ 60 void subjectKilled(Observable * const publisher); 61 62 private: 40 63 typedef std::map< size_t, Notification_ptr> NotificationTypetoRefMap; 41 64
Note:
See TracChangeset
for help on using the changeset viewer.
