diff 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
line wrap: on
line diff
--- a/Framework/Oracle/ParseDicomFileCommand.h	Wed Nov 06 15:16:45 2019 +0100
+++ b/Framework/Oracle/ParseDicomFileCommand.h	Wed Nov 06 17:34:58 2019 +0100
@@ -41,7 +41,7 @@
   class ParseDicomFileCommand : public OracleCommandBase
   {
   public:
-    class SuccessMessage : public OracleMessageBase
+    class SuccessMessage : public OriginMessage<ParseDicomFileCommand>
     {
       ORTHANC_STONE_MESSAGE(__FILE__, __LINE__);
 
@@ -52,7 +52,7 @@
       std::string                sopInstanceUid_;
 
     public:
-      SuccessMessage(ParseDicomFileCommand& command,
+      SuccessMessage(const ParseDicomFileCommand& command,
                      Orthanc::ParsedDicomFile& dicom,
                      size_t fileSize,
                      bool hasPixelData);
@@ -82,6 +82,12 @@
     std::string  path_;
     bool         pixelDataIncluded_;
 
+    ParseDicomFileCommand(const ParseDicomFileCommand& other) :
+      path_(other.path_),
+      pixelDataIncluded_(other.pixelDataIncluded_)
+    {
+    }
+
   public:
     ParseDicomFileCommand(const std::string& path) :
       path_(path),
@@ -104,6 +110,11 @@
       return Type_ParseDicomFile;
     }
 
+    virtual IOracleCommand* Clone() const
+    {
+      return new ParseDicomFileCommand(*this);
+    }
+
     const std::string& GetPath() const
     {
       return path_;