comparison 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
comparison
equal deleted inserted replaced
1117:383aa2a7d426 1124:a8bf81756839
21 21
22 #pragma once 22 #pragma once
23 23
24 #include "IOracleRunner.h" 24 #include "IOracleRunner.h"
25 25
26 #if !defined(ORTHANC_ENABLE_DCMTK)
27 # error The macro ORTHANC_ENABLE_DCMTK must be defined
28 #endif
29
30 #if ORTHANC_ENABLE_DCMTK == 1
31 # include "../Toolbox/ParsedDicomFileCache.h"
32 #endif
33
34
26 #include <Core/Enumerations.h> // For ORTHANC_OVERRIDE 35 #include <Core/Enumerations.h> // For ORTHANC_OVERRIDE
27 #include <Core/WebServiceParameters.h> 36 #include <Core/WebServiceParameters.h>
28 37
29 namespace OrthancStone 38 namespace OrthancStone
30 { 39 {
32 { 41 {
33 private: 42 private:
34 Orthanc::WebServiceParameters orthanc_; 43 Orthanc::WebServiceParameters orthanc_;
35 std::string rootDirectory_; 44 std::string rootDirectory_;
36 45
46 #if ORTHANC_ENABLE_DCMTK == 1
47 boost::shared_ptr<ParsedDicomFileCache> dicomCache_;
48 #endif
49
37 public: 50 public:
38 GenericOracleRunner() : 51 GenericOracleRunner()
39 rootDirectory_(".") 52 : rootDirectory_(".")
53 #if ORTHANC_ENABLE_DCMTK == 1
54 , dicomCache_(NULL)
55 #endif
40 { 56 {
41 } 57 }
42 58
43 void SetOrthanc(const Orthanc::WebServiceParameters& orthanc) 59 void SetOrthanc(const Orthanc::WebServiceParameters& orthanc)
44 { 60 {
58 const std::string GetRootDirectory() const 74 const std::string GetRootDirectory() const
59 { 75 {
60 return rootDirectory_; 76 return rootDirectory_;
61 } 77 }
62 78
79 #if ORTHANC_ENABLE_DCMTK == 1
80 void SetDicomCache(boost::shared_ptr<ParsedDicomFileCache> cache)
81 {
82 dicomCache_ = cache;
83 }
84 #endif
85
63 virtual IMessage* Run(IOracleCommand& command) ORTHANC_OVERRIDE; 86 virtual IMessage* Run(IOracleCommand& command) ORTHANC_OVERRIDE;
64 }; 87 };
65 } 88 }