Mercurial > hg > orthanc-stone
comparison Framework/Oracle/ReadFileCommand.h @ 1128:8e3763d1736a broker
removing CustomOracleCommand
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 05 Nov 2019 22:39:25 +0100 |
parents | 98cdfe5768a4 |
children | a0a33e5ea5bb |
comparison
equal
deleted
inserted
replaced
1127:3308ef083297 | 1128:8e3763d1736a |
---|---|
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "../Messages/IMessage.h" | 24 #include "../Messages/IMessage.h" |
25 #include "OracleCommandWithPayload.h" | 25 #include "OracleCommandBase.h" |
26 | 26 |
27 namespace OrthancStone | 27 namespace OrthancStone |
28 { | 28 { |
29 class ReadFileCommand : public OracleCommandWithPayload | 29 class ReadFileCommand : public OracleCommandBase |
30 { | 30 { |
31 public: | 31 public: |
32 class SuccessMessage : public OriginMessage<ReadFileCommand> | 32 class SuccessMessage : public OracleMessageBase |
33 { | 33 { |
34 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__); | 34 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__); |
35 | 35 |
36 private: | 36 private: |
37 std::string content_; | 37 std::string content_; |
38 | 38 |
39 public: | 39 public: |
40 SuccessMessage(const ReadFileCommand& command, | 40 SuccessMessage(ReadFileCommand& command, |
41 std::string& content /* will be swapped to avoid a memcpy() */) : | 41 std::string& content /* will be swapped to avoid a memcpy() */) : |
42 OriginMessage(command) | 42 OracleMessageBase(command) |
43 { | 43 { |
44 content_.swap(content); | 44 content_.swap(content); |
45 } | 45 } |
46 | 46 |
47 const std::string& GetContent() const | 47 const std::string& GetContent() const |