Loading [MathJax]/extensions/TeX/AMSsymbols.js
PSCF v1.2
Observer.h
1#ifndef UTIL_OBSERVER_H
2#define UTIL_OBSERVER_H
3
4/*
5* Util Package - C++ Utilities for Scientific Computation
6*
7* Copyright 2010 - 2017, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11namespace Util
12{
13
23 template <typename Event>
25 {
26
27 public:
28
29 // Default constructor.
30
34 virtual ~Observer();
35
41 virtual void update(const Event& event) = 0;
42
43 };
44
45 // Destructor
46 template <typename Event>
49
50}
51
52#endif
Abstract class template for observer in the observer design pattern.
Definition Observer.h:25
virtual ~Observer()
Destructor.
Definition Observer.h:47
virtual void update(const Event &event)=0
Respond to news of an event.
Utility classes for scientific computation.