Mercurial > hg > orthanc-stone
comparison Framework/Oracle/IOracleCommand.h @ 1128:8e3763d1736a broker
removing CustomOracleCommand
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 05 Nov 2019 22:39:25 +0100 |
parents | b82b74d13830 |
children | a0a33e5ea5bb |
comparison
equal
deleted
inserted
replaced
1127:3308ef083297 | 1128:8e3763d1736a |
---|---|
19 **/ | 19 **/ |
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "../Messages/IMessage.h" | |
25 | |
26 #include <Core/IDynamicObject.h> | |
27 | |
24 #include <boost/noncopyable.hpp> | 28 #include <boost/noncopyable.hpp> |
25 | 29 |
26 namespace OrthancStone | 30 namespace OrthancStone |
27 { | 31 { |
28 class IOracleCommand : public boost::noncopyable | 32 class IOracleCommand : public boost::noncopyable |
29 { | 33 { |
30 public: | 34 public: |
35 class OracleMessageBase : public IMessage | |
36 { | |
37 private: | |
38 IOracleCommand& command_; | |
39 | |
40 public: | |
41 OracleMessageBase(IOracleCommand& command) : | |
42 command_(command) | |
43 { | |
44 } | |
45 | |
46 void AcquireCommandPayload(Orthanc::IDynamicObject* payload) const | |
47 { | |
48 command_.AcquirePayload(payload); | |
49 } | |
50 | |
51 const IOracleCommand& GetCommand() const | |
52 { | |
53 return command_; | |
54 } | |
55 }; | |
56 | |
31 enum Type | 57 enum Type |
32 { | 58 { |
33 Type_Custom, | |
34 Type_GetOrthancImage, | 59 Type_GetOrthancImage, |
35 Type_GetOrthancWebViewerJpeg, | 60 Type_GetOrthancWebViewerJpeg, |
36 Type_Http, | 61 Type_Http, |
37 Type_OrthancRestApi, | 62 Type_OrthancRestApi, |
38 Type_ParseDicomFile, | 63 Type_ParseDicomFile, |
43 virtual ~IOracleCommand() | 68 virtual ~IOracleCommand() |
44 { | 69 { |
45 } | 70 } |
46 | 71 |
47 virtual Type GetType() const = 0; | 72 virtual Type GetType() const = 0; |
73 | |
74 virtual void AcquirePayload(Orthanc::IDynamicObject* payload) = 0; | |
75 | |
76 virtual bool HasPayload() const = 0; | |
77 | |
78 virtual Orthanc::IDynamicObject& GetPayload() const = 0; | |
48 }; | 79 }; |
49 } | 80 } |