diff Framework/Oracle/GenericOracleRunner.h @ 1124:a8bf81756839 broker

unsuccessful attempt to cache ParseDicomFileCommand
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 05 Nov 2019 18:49:06 +0100
parents 98cdfe5768a4
children 3308ef083297
line wrap: on
line diff
--- a/Framework/Oracle/GenericOracleRunner.h	Mon Nov 04 15:54:57 2019 +0100
+++ b/Framework/Oracle/GenericOracleRunner.h	Tue Nov 05 18:49:06 2019 +0100
@@ -23,6 +23,15 @@
 
 #include "IOracleRunner.h"
 
+#if !defined(ORTHANC_ENABLE_DCMTK)
+#  error The macro ORTHANC_ENABLE_DCMTK must be defined
+#endif
+
+#if ORTHANC_ENABLE_DCMTK == 1
+#  include "../Toolbox/ParsedDicomFileCache.h"
+#endif
+
+
 #include <Core/Enumerations.h>  // For ORTHANC_OVERRIDE
 #include <Core/WebServiceParameters.h>
 
@@ -34,9 +43,16 @@
     Orthanc::WebServiceParameters  orthanc_;
     std::string                    rootDirectory_;
 
+#if ORTHANC_ENABLE_DCMTK == 1
+    boost::shared_ptr<ParsedDicomFileCache>  dicomCache_;
+#endif
+
   public:
-    GenericOracleRunner() :
-      rootDirectory_(".")
+    GenericOracleRunner()
+      : rootDirectory_(".")
+#if ORTHANC_ENABLE_DCMTK == 1
+      , dicomCache_(NULL)
+#endif
     {
     }
 
@@ -60,6 +76,13 @@
       return rootDirectory_;
     }
 
+#if ORTHANC_ENABLE_DCMTK == 1
+    void SetDicomCache(boost::shared_ptr<ParsedDicomFileCache> cache)
+    {
+      dicomCache_ = cache;
+    }
+#endif
+
     virtual IMessage* Run(IOracleCommand& command) ORTHANC_OVERRIDE;
   };
 }