Changeset 8fe1e2 for src/Patterns/Observer/Observable.hpp
- Timestamp:
- Dec 13, 2011, 9:46:12 AM (14 years ago)
- Children:
- 75d156
- Parents:
- 549b62
- git-author:
- Frederik Heber <heber@…> (12/02/11 09:58:19)
- git-committer:
- Frederik Heber <heber@…> (12/13/11 09:46:12)
- File:
-
- 1 edited
-
src/Patterns/Observer/Observable.hpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Patterns/Observer/Observable.hpp
r549b62 r8fe1e2 18 18 #include <string> 19 19 20 #include "Range.hpp" 20 21 #include "Observer/defs.hpp" 21 22 #include "Observer/Observer.hpp" … … 35 36 virtual ~Observable(); 36 37 38 /** This class is only used to distinguish from size_t in the overload. 39 * 40 * It encapsulates a const int (the priority level) and checks valid bounds 41 * in constructor. 42 * 43 */ 44 class PriorityLevel { 45 public: 46 explicit PriorityLevel(const int i); 47 ~PriorityLevel(); 48 49 const int level; 50 private: 51 static range<int> ValidRange; 52 }; 53 37 54 /** 38 55 * Sign an Observer on to this Observable. The Observer will be notified … … 46 63 * ussually no need to order the update sequence. 47 64 */ 48 virtual void signOn(Observer *target, int priority=0) const;65 virtual void signOn(Observer *target, PriorityLevel priority = PriorityDefault) const; 49 66 50 67 /** … … 95 112 static ChannelMap NotificationChannels; 96 113 114 static PriorityLevel PriorityDefault; 115 97 116 private: 98 117 typedef std::multimap<int,Observer*> callees_t;
Note:
See TracChangeset
for help on using the changeset viewer.
