Candidate_v1.6.1
        Candidate_v1.7.0
        stable
      
      
        
          | 
            Last change
 on this file since 1e06ed was             99f4ee, checked in by Frederik Heber <heber@…>, 14 years ago           | 
        
        
          | 
             
Class Box is now also an Observable. 
 
- it has two channels to notify about changes in its Matrix and boundary
conditions.
  
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            859 bytes
           | 
        
      
      
| Line |   | 
|---|
| 1 | /*
 | 
|---|
| 2 |  * ObserverStub.hpp
 | 
|---|
| 3 |  *
 | 
|---|
| 4 |  *  Created on: Dec 19, 2011
 | 
|---|
| 5 |  *      Author: heber
 | 
|---|
| 6 |  */
 | 
|---|
| 7 | 
 | 
|---|
| 8 | #ifndef OBSERVERSTUB_HPP_
 | 
|---|
| 9 | #define OBSERVERSTUB_HPP_
 | 
|---|
| 10 | 
 | 
|---|
| 11 | // include config.h
 | 
|---|
| 12 | #ifdef HAVE_CONFIG_H
 | 
|---|
| 13 | #include <config.h>
 | 
|---|
| 14 | #endif
 | 
|---|
| 15 | 
 | 
|---|
| 16 | 
 | 
|---|
| 17 | #include "CodePatterns/Observer/Observer.hpp"
 | 
|---|
| 18 | 
 | 
|---|
| 19 | class UpdateCountObserver : public Observer {
 | 
|---|
| 20 | public:
 | 
|---|
| 21 |   UpdateCountObserver();
 | 
|---|
| 22 |   virtual ~UpdateCountObserver();
 | 
|---|
| 23 | 
 | 
|---|
| 24 |   void update(Observable *publisher);
 | 
|---|
| 25 |   void subjectKilled(Observable *publisher);
 | 
|---|
| 26 | 
 | 
|---|
| 27 |   int updates;
 | 
|---|
| 28 | };
 | 
|---|
| 29 | 
 | 
|---|
| 30 | class NotificationObserver : public Observer {
 | 
|---|
| 31 | public:
 | 
|---|
| 32 |   NotificationObserver(Notification_ptr notification);
 | 
|---|
| 33 |   virtual ~NotificationObserver();
 | 
|---|
| 34 | 
 | 
|---|
| 35 |   void update(Observable*);
 | 
|---|
| 36 |   void subjectKilled(Observable*);
 | 
|---|
| 37 |   void recieveNotification(Observable *publisher, Notification_ptr notification);
 | 
|---|
| 38 | 
 | 
|---|
| 39 |   Notification_ptr requestedNotification;
 | 
|---|
| 40 | 
 | 
|---|
| 41 |   bool wasNotified;
 | 
|---|
| 42 | };
 | 
|---|
| 43 | 
 | 
|---|
| 44 | #endif /* OBSERVERSTUB_HPP_ */
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.