Mercurial > hg > orthanc-stone
annotate Framework/Oracle/GenericOracleRunner.h @ 1129:c3d4adf8bc70 broker
removing IOracleRunner abstraction
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 05 Nov 2019 22:45:27 +0100 |
parents | 3308ef083297 |
children | 87fbeb823375 |
rev | line source |
---|---|
1077 | 1 /** |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium | |
6 * | |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Affero General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Affero General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Affero General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
21 | |
22 #pragma once | |
23 | |
1124
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
24 #if !defined(ORTHANC_ENABLE_DCMTK) |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
25 # error The macro ORTHANC_ENABLE_DCMTK must be defined |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
26 #endif |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
27 |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
28 #if ORTHANC_ENABLE_DCMTK == 1 |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
29 # include "../Toolbox/ParsedDicomFileCache.h" |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
30 #endif |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
31 |
1129
c3d4adf8bc70
removing IOracleRunner abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1127
diff
changeset
|
32 #include "IOracleCommand.h" |
1124
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
33 |
1077 | 34 #include <Core/Enumerations.h> // For ORTHANC_OVERRIDE |
35 #include <Core/WebServiceParameters.h> | |
36 | |
37 namespace OrthancStone | |
38 { | |
1129
c3d4adf8bc70
removing IOracleRunner abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1127
diff
changeset
|
39 class GenericOracleRunner : public boost::noncopyable |
1077 | 40 { |
41 private: | |
1104 | 42 Orthanc::WebServiceParameters orthanc_; |
43 std::string rootDirectory_; | |
1077 | 44 |
1124
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
45 #if ORTHANC_ENABLE_DCMTK == 1 |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
46 boost::shared_ptr<ParsedDicomFileCache> dicomCache_; |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
47 #endif |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
48 |
1077 | 49 public: |
1127 | 50 GenericOracleRunner() : |
51 rootDirectory_(".") | |
1104 | 52 { |
53 } | |
54 | |
55 void SetOrthanc(const Orthanc::WebServiceParameters& orthanc) | |
56 { | |
57 orthanc_ = orthanc; | |
58 } | |
59 | |
60 const Orthanc::WebServiceParameters& GetOrthanc() const | |
1077 | 61 { |
1104 | 62 return orthanc_; |
63 } | |
64 | |
65 void SetRootDirectory(const std::string& rootDirectory) | |
66 { | |
67 rootDirectory_ = rootDirectory; | |
68 } | |
69 | |
70 const std::string GetRootDirectory() const | |
71 { | |
72 return rootDirectory_; | |
1077 | 73 } |
74 | |
1124
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
75 #if ORTHANC_ENABLE_DCMTK == 1 |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
76 void SetDicomCache(boost::shared_ptr<ParsedDicomFileCache> cache) |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
77 { |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
78 dicomCache_ = cache; |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
79 } |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
80 #endif |
a8bf81756839
unsuccessful attempt to cache ParseDicomFileCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1104
diff
changeset
|
81 |
1129
c3d4adf8bc70
removing IOracleRunner abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1127
diff
changeset
|
82 IMessage* Run(IOracleCommand& command); |
1077 | 83 }; |
84 } |