Mercurial > hg > orthanc-stone
comparison Framework/Oracle/GenericOracleRunner.h @ 1098:17660df24c36 broker
simplification of IOracleRunner
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 25 Oct 2019 13:01:24 +0200 |
parents | d7a18a3cd6f9 |
children | 98cdfe5768a4 |
comparison
equal
deleted
inserted
replaced
1097:4383382db01d | 1098:17660df24c36 |
---|---|
19 **/ | 19 **/ |
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "../Messages/IMessageEmitter.h" | |
25 #include "IOracleRunner.h" | 24 #include "IOracleRunner.h" |
26 | 25 |
27 #include <Core/Enumerations.h> // For ORTHANC_OVERRIDE | 26 #include <Core/Enumerations.h> // For ORTHANC_OVERRIDE |
28 #include <Core/WebServiceParameters.h> | 27 #include <Core/WebServiceParameters.h> |
29 | 28 |
30 namespace OrthancStone | 29 namespace OrthancStone |
31 { | 30 { |
32 class GenericOracleRunner : public IOracleRunner | 31 class GenericOracleRunner : public IOracleRunner |
33 { | 32 { |
34 private: | 33 private: |
35 IMessageEmitter& emitter_; | |
36 const Orthanc::WebServiceParameters& orthanc_; | 34 const Orthanc::WebServiceParameters& orthanc_; |
37 | 35 |
38 public: | 36 public: |
39 GenericOracleRunner(IMessageEmitter& emitter, | 37 GenericOracleRunner(const Orthanc::WebServiceParameters& orthanc) : |
40 const Orthanc::WebServiceParameters& orthanc) : | |
41 emitter_(emitter), | |
42 orthanc_(orthanc) | 38 orthanc_(orthanc) |
43 { | 39 { |
44 } | 40 } |
45 | 41 |
46 virtual void Run(boost::weak_ptr<IObserver>& receiver, | 42 virtual IMessage* Run(IOracleCommand& command) ORTHANC_OVERRIDE; |
47 IOracleCommand& command) ORTHANC_OVERRIDE; | |
48 }; | 43 }; |
49 } | 44 } |