Mercurial > hg > orthanc-stone
comparison Framework/Messages/IObserver.h @ 1064:af4b9cba905f broker
simplify how observers are regsitered, and how callables are created
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 15 Oct 2019 13:46:01 +0200 |
parents | e146743f6cdc |
children | 0ca50d275b9a |
comparison
equal
deleted
inserted
replaced
1063:3e8f59cefec6 | 1064:af4b9cba905f |
---|---|
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include <boost/noncopyable.hpp> | 24 #include <boost/noncopyable.hpp> |
25 #include <boost/enable_shared_from_this.hpp> | |
26 | 25 |
27 namespace OrthancStone | 26 namespace OrthancStone |
28 { | 27 { |
29 class IObserver : public boost::noncopyable | 28 class IObserver : public boost::noncopyable |
30 { | 29 { |
35 | 34 |
36 virtual ~IObserver() | 35 virtual ~IObserver() |
37 { | 36 { |
38 } | 37 } |
39 }; | 38 }; |
40 | |
41 template <typename T> | |
42 class ObserverBase : | |
43 public IObserver, | |
44 public boost::enable_shared_from_this<T> | |
45 { | |
46 }; | |
47 } | 39 } |