Candidate_v1.7.0
        stable
      
      
      
| Line |   | 
|---|
| 1 | /*
 | 
|---|
| 2 |  * bond_observable.hpp
 | 
|---|
| 3 |  *
 | 
|---|
| 4 |  *  Created on: Jan 5, 2012
 | 
|---|
| 5 |  *      Author: heber
 | 
|---|
| 6 |  */
 | 
|---|
| 7 | 
 | 
|---|
| 8 | #ifndef BOND_OBSERVABLE_HPP_
 | 
|---|
| 9 | #define BOND_OBSERVABLE_HPP_
 | 
|---|
| 10 | 
 | 
|---|
| 11 | // include config.h
 | 
|---|
| 12 | #ifdef HAVE_CONFIG_H
 | 
|---|
| 13 | #include <config.h>
 | 
|---|
| 14 | #endif
 | 
|---|
| 15 | 
 | 
|---|
| 16 | 
 | 
|---|
| 17 | #include "CodePatterns/Observer/Channels.hpp"
 | 
|---|
| 18 | #include "CodePatterns/Observer/Observable.hpp"
 | 
|---|
| 19 | 
 | 
|---|
| 20 | #include <map>
 | 
|---|
| 21 | 
 | 
|---|
| 22 | /** This class encapsulates Observable pattern along with required notification
 | 
|---|
| 23 |  *  types.
 | 
|---|
| 24 |  */
 | 
|---|
| 25 | class BondObservable : public Observable
 | 
|---|
| 26 | {
 | 
|---|
| 27 | public:
 | 
|---|
| 28 |   enum NotificationType {
 | 
|---|
| 29 |     BondRemoved,          // bond is about to be removed
 | 
|---|
| 30 |     DegreeChanged,        // bond degree is different
 | 
|---|
| 31 |     NotificationType_MAX  // denotes the maximum of available notification types
 | 
|---|
| 32 |   };
 | 
|---|
| 33 | 
 | 
|---|
| 34 |   BondObservable();
 | 
|---|
| 35 |   virtual ~BondObservable();
 | 
|---|
| 36 | };
 | 
|---|
| 37 | 
 | 
|---|
| 38 | 
 | 
|---|
| 39 | #endif /* BOND_OBSERVABLE_HPP_ */
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.