- Timestamp:
- Dec 13, 2011, 12:02:21 PM (14 years ago)
- Children:
- 3324cf
- Parents:
- d85532
- git-author:
- Frederik Heber <heber@…> (12/02/11 13:13:44)
- git-committer:
- Frederik Heber <heber@…> (12/13/11 12:02:21)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Patterns/Observer/unittests/stubs/ObserverStub.cpp
rd85532 rb760ac5 239 239 {} 240 240 241 /************ RelayNotification ***************/ 242 243 RelayNotification::RelayNotification() : 244 Relay(std::string("RelayTest")) 245 { 246 Channels *OurChannel = new Channels(); 247 NotificationChannels.insert( std::make_pair(this, OurChannel) ); 248 OurChannel->addChannel(NotificationObservable::Operation1Notify); 249 OurChannel->addChannel(NotificationObservable::Operation2Notify); 250 } 251 252 RelayNotification::~RelayNotification() 253 {} 254 241 255 /************ RelayCountObserver ***************/ 242 256 … … 259 273 } 260 274 275 /********* RelayNotificationObserver ***********/ 276 277 RelayNotificationObserver::RelayNotificationObserver(const Observable * const _relay) : 278 Observer("RelayNotificationObserver"), 279 wasNotified(false), 280 relay(_relay) 281 {} 282 283 RelayNotificationObserver::~RelayNotificationObserver() 284 {} 285 286 void RelayNotificationObserver::update(Observable*){} 287 void RelayNotificationObserver::subjectKilled(Observable*){} 288 void RelayNotificationObserver::recieveNotification(Observable *publisher, Notification_ptr notification){ 289 // check that we are not called by the relay itself 290 CPPUNIT_ASSERT(publisher != relay); 291 wasNotified = true; 292 } 293
Note:
See TracChangeset
for help on using the changeset viewer.
