comparison Framework/Oracle/ParseDicomFileCommand.h @ 1135:a0a33e5ea5bb broker

IOracleCommand::Clone()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 06 Nov 2019 17:34:58 +0100
parents 87fbeb823375
children
comparison
equal deleted inserted replaced
1134:87fbeb823375 1135:a0a33e5ea5bb
39 namespace OrthancStone 39 namespace OrthancStone
40 { 40 {
41 class ParseDicomFileCommand : public OracleCommandBase 41 class ParseDicomFileCommand : public OracleCommandBase
42 { 42 {
43 public: 43 public:
44 class SuccessMessage : public OracleMessageBase 44 class SuccessMessage : public OriginMessage<ParseDicomFileCommand>
45 { 45 {
46 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__); 46 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__);
47 47
48 private: 48 private:
49 Orthanc::ParsedDicomFile& dicom_; 49 Orthanc::ParsedDicomFile& dicom_;
50 size_t fileSize_; 50 size_t fileSize_;
51 bool hasPixelData_; 51 bool hasPixelData_;
52 std::string sopInstanceUid_; 52 std::string sopInstanceUid_;
53 53
54 public: 54 public:
55 SuccessMessage(ParseDicomFileCommand& command, 55 SuccessMessage(const ParseDicomFileCommand& command,
56 Orthanc::ParsedDicomFile& dicom, 56 Orthanc::ParsedDicomFile& dicom,
57 size_t fileSize, 57 size_t fileSize,
58 bool hasPixelData); 58 bool hasPixelData);
59 59
60 Orthanc::ParsedDicomFile& GetDicom() const 60 Orthanc::ParsedDicomFile& GetDicom() const
80 80
81 private: 81 private:
82 std::string path_; 82 std::string path_;
83 bool pixelDataIncluded_; 83 bool pixelDataIncluded_;
84 84
85 ParseDicomFileCommand(const ParseDicomFileCommand& other) :
86 path_(other.path_),
87 pixelDataIncluded_(other.pixelDataIncluded_)
88 {
89 }
90
85 public: 91 public:
86 ParseDicomFileCommand(const std::string& path) : 92 ParseDicomFileCommand(const std::string& path) :
87 path_(path), 93 path_(path),
88 pixelDataIncluded_(true) 94 pixelDataIncluded_(true)
89 { 95 {
102 virtual Type GetType() const 108 virtual Type GetType() const
103 { 109 {
104 return Type_ParseDicomFile; 110 return Type_ParseDicomFile;
105 } 111 }
106 112
113 virtual IOracleCommand* Clone() const
114 {
115 return new ParseDicomFileCommand(*this);
116 }
117
107 const std::string& GetPath() const 118 const std::string& GetPath() const
108 { 119 {
109 return path_; 120 return path_;
110 } 121 }
111 122