Changeset 74e0f7 for src/Patterns/unittests/stubs/ObserverStub.cpp
- Timestamp:
- Sep 1, 2011, 11:07:47 AM (14 years ago)
- Children:
- 9e776f
- Parents:
- 451f17
- git-author:
- Frederik Heber <heber@…> (09/01/11 11:02:49)
- git-committer:
- Frederik Heber <heber@…> (09/01/11 11:07:47)
- File:
-
- 1 edited
-
src/Patterns/unittests/stubs/ObserverStub.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Patterns/unittests/stubs/ObserverStub.cpp
r451f17 r74e0f7 31 31 {}; 32 32 33 UpdateCountObserver::~UpdateCountObserver() 34 {} 35 33 36 void UpdateCountObserver::update(Observable *publisher){ 34 37 updates++; … … 127 130 128 131 NotificationObservable::NotificationObservable() : 129 Observable("NotificationObservable"), 130 notification1(new Notification(this)), 131 notification2(new Notification(this)) 132 {} 133 134 NotificationObservable::~NotificationObservable(){ 135 delete notification1; 136 delete notification2; 132 Observable("NotificationObservable") 133 { 134 NotificationChannels = new Channels(this); 135 NotificationChannels->addChannel(Operation1Notify); 136 NotificationChannels->addChannel(Operation2Notify); 137 } 138 139 NotificationObservable::~NotificationObservable() 140 { 141 delete NotificationChannels; 137 142 } 138 143 139 144 void NotificationObservable::operation1(){ 140 145 OBSERVE; 141 NOTIFY( notification1);146 NOTIFY(Operation1Notify); 142 147 } 143 148 144 149 void NotificationObservable::operation2(){ 145 150 OBSERVE; 146 NOTIFY( notification2);151 NOTIFY(Operation2Notify); 147 152 } 148 153 … … 153 158 requestedNotification(notification), 154 159 wasNotified(false) 160 {} 161 162 NotificationObserver::~NotificationObserver() 155 163 {} 156 164
Note:
See TracChangeset
for help on using the changeset viewer.
