Mercurial > hg > orthanc
comparison Core/JobsEngine/SetOfCommandsJob.h @ 3786:3801435e34a1 SylvainRouquette/fix-issue169-95b752c
integration Orthanc-1.6.0->SylvainRouquette
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 19 Mar 2020 11:48:30 +0100 |
parents | 9201a7858cce |
children |
comparison
equal
deleted
inserted
replaced
3785:763533d6dd67 | 3786:3801435e34a1 |
---|---|
1 /** | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
4 * Department, University Hospital of Liege, Belgium | 4 * Department, University Hospital of Liege, Belgium |
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium | 5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
6 * | 6 * |
7 * This program is free software: you can redistribute it and/or | 7 * This program is free software: you can redistribute it and/or |
8 * modify it under the terms of the GNU General Public License as | 8 * modify it under the terms of the GNU General Public License as |
9 * published by the Free Software Foundation, either version 3 of the | 9 * published by the Free Software Foundation, either version 3 of the |
10 * License, or (at your option) any later version. | 10 * License, or (at your option) any later version. |
47 public: | 47 public: |
48 virtual ~ICommand() | 48 virtual ~ICommand() |
49 { | 49 { |
50 } | 50 } |
51 | 51 |
52 virtual bool Execute() = 0; | 52 virtual bool Execute(const std::string& jobId) = 0; |
53 | 53 |
54 virtual void Serialize(Json::Value& target) const = 0; | 54 virtual void Serialize(Json::Value& target) const = 0; |
55 }; | 55 }; |
56 | 56 |
57 class ICommandUnserializer : public boost::noncopyable | 57 class ICommandUnserializer : public boost::noncopyable |
108 return permissive_; | 108 return permissive_; |
109 } | 109 } |
110 | 110 |
111 void SetPermissive(bool permissive); | 111 void SetPermissive(bool permissive); |
112 | 112 |
113 virtual void Reset(); | 113 virtual void Reset() ORTHANC_OVERRIDE; |
114 | 114 |
115 virtual void Start() | 115 virtual void Start() ORTHANC_OVERRIDE |
116 { | 116 { |
117 started_ = true; | 117 started_ = true; |
118 } | 118 } |
119 | 119 |
120 virtual float GetProgress(); | 120 virtual float GetProgress() ORTHANC_OVERRIDE; |
121 | 121 |
122 bool IsStarted() const | 122 bool IsStarted() const |
123 { | 123 { |
124 return started_; | 124 return started_; |
125 } | 125 } |
126 | 126 |
127 const ICommand& GetCommand(size_t index) const; | 127 const ICommand& GetCommand(size_t index) const; |
128 | 128 |
129 virtual JobStepResult Step(); | 129 virtual JobStepResult Step(const std::string& jobId) ORTHANC_OVERRIDE; |
130 | 130 |
131 virtual void GetPublicContent(Json::Value& value); | 131 virtual void GetPublicContent(Json::Value& value) ORTHANC_OVERRIDE; |
132 | 132 |
133 virtual bool Serialize(Json::Value& target); | 133 virtual bool Serialize(Json::Value& target) ORTHANC_OVERRIDE; |
134 | 134 |
135 virtual bool GetOutput(std::string& output, | 135 virtual bool GetOutput(std::string& output, |
136 MimeType& mime, | 136 MimeType& mime, |
137 const std::string& key) | 137 const std::string& key) ORTHANC_OVERRIDE |
138 { | 138 { |
139 return false; | 139 return false; |
140 } | 140 } |
141 }; | 141 }; |
142 } | 142 } |