Mercurial > hg > orthanc
annotate OrthancFramework/Sources/JobsEngine/SetOfInstancesJob.h @ 5121:77e20ce39d6f
removed some warnings for recent versions of CMake
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 19 Dec 2022 15:09:38 +0100 |
parents | 43e613a7756b |
children | 0ea402b4d901 |
rev | line source |
---|---|
2585 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
4870
43e613a7756b
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4831
diff
changeset
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium |
43e613a7756b
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4831
diff
changeset
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
2585 | 7 * |
8 * This program is free software: you can redistribute it and/or | |
4119
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
9 * modify it under the terms of the GNU Lesser General Public License |
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
10 * as published by the Free Software Foundation, either version 3 of |
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
11 * the License, or (at your option) any later version. |
2585 | 12 * |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
4119
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
16 * Lesser General Public License for more details. |
2585 | 17 * |
4119
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
18 * You should have received a copy of the GNU Lesser General Public |
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
19 * License along with this program. If not, see |
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4063
diff
changeset
|
20 * <http://www.gnu.org/licenses/>. |
2585 | 21 **/ |
22 | |
23 | |
24 #pragma once | |
25 | |
26 #include "IJob.h" | |
2860 | 27 #include "SetOfCommandsJob.h" |
2585 | 28 |
29 #include <set> | |
30 | |
31 namespace Orthanc | |
32 { | |
4063
e00f3d089991
shared library of orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
33 class ORTHANC_PUBLIC SetOfInstancesJob : public SetOfCommandsJob |
2585 | 34 { |
35 private: | |
2860 | 36 class InstanceCommand; |
37 class TrailingStepCommand; | |
38 class InstanceUnserializer; | |
39 | |
40 bool hasTrailingStep_; | |
41 std::set<std::string> failedInstances_; | |
3374
d0d6bd633e4c
Reporting of "ParentResources" in "DicomModalityStore" and "DicomModalityStore" jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
42 std::set<std::string> parentResources_; |
2585 | 43 |
44 protected: | |
45 virtual bool HandleInstance(const std::string& instance) = 0; | |
46 | |
2842
ff0ed5ea9e4e
trailing step in SetOfInstancesJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2812
diff
changeset
|
47 virtual bool HandleTrailingStep() = 0; |
ff0ed5ea9e4e
trailing step in SetOfInstancesJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2812
diff
changeset
|
48 |
2860 | 49 // Hiding this method, use AddInstance() instead |
50 using SetOfCommandsJob::AddCommand; | |
51 | |
2585 | 52 public: |
2860 | 53 SetOfInstancesJob(); |
54 | |
4202
2007ab69ac16
moving ORTHANC_FORCE_INLINE and ORTHANC_OVERRIDE from Enumerations.h to Compatibility.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
55 explicit SetOfInstancesJob(const Json::Value& source); // Unserialization |
2860 | 56 |
3374
d0d6bd633e4c
Reporting of "ParentResources" in "DicomModalityStore" and "DicomModalityStore" jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
57 // Only used for reporting in the public content |
d0d6bd633e4c
Reporting of "ParentResources" in "DicomModalityStore" and "DicomModalityStore" jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
58 // https://groups.google.com/d/msg/orthanc-users/9GCV88GLEzw/6wAgP_PRAgAJ |
4304 | 59 void AddParentResource(const std::string& resource); |
3374
d0d6bd633e4c
Reporting of "ParentResources" in "DicomModalityStore" and "DicomModalityStore" jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3060
diff
changeset
|
60 |
2860 | 61 void AddInstance(const std::string& instance); |
2585 | 62 |
2860 | 63 void AddTrailingStep(); |
64 | |
65 size_t GetInstancesCount() const; | |
66 | |
67 const std::string& GetInstance(size_t index) const; | |
2652 | 68 |
4304 | 69 bool HasTrailingStep() const; |
2657
5eea2f11e8df
JobsSerialization.GenericJobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2652
diff
changeset
|
70 |
4304 | 71 const std::set<std::string>& GetFailedInstances() const; |
2657
5eea2f11e8df
JobsSerialization.GenericJobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2652
diff
changeset
|
72 |
4304 | 73 bool IsFailedInstance(const std::string& instance) const; |
2860 | 74 |
4202
2007ab69ac16
moving ORTHANC_FORCE_INLINE and ORTHANC_OVERRIDE from Enumerations.h to Compatibility.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
75 virtual void Start() ORTHANC_OVERRIDE; |
2860 | 76 |
4202
2007ab69ac16
moving ORTHANC_FORCE_INLINE and ORTHANC_OVERRIDE from Enumerations.h to Compatibility.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
77 virtual void Reset() ORTHANC_OVERRIDE; |
2860 | 78 |
4202
2007ab69ac16
moving ORTHANC_FORCE_INLINE and ORTHANC_OVERRIDE from Enumerations.h to Compatibility.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
79 virtual void GetPublicContent(Json::Value& target) ORTHANC_OVERRIDE; |
2860 | 80 |
4202
2007ab69ac16
moving ORTHANC_FORCE_INLINE and ORTHANC_OVERRIDE from Enumerations.h to Compatibility.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
81 virtual bool Serialize(Json::Value& target) ORTHANC_OVERRIDE; |
2585 | 82 }; |
83 } |