Mercurial > hg > orthanc
comparison OrthancFramework/Sources/JobsEngine/Operations/SequenceOfOperationsJob.h @ 4304:50b0c69b653a
continued abi
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 06 Nov 2020 16:33:52 +0100 |
parents | 2007ab69ac16 |
children | 8992faf451fc |
comparison
equal
deleted
inserted
replaced
4303:44b53a2c0a13 | 4304:50b0c69b653a |
---|---|
83 private: | 83 private: |
84 SequenceOfOperationsJob& that_; | 84 SequenceOfOperationsJob& that_; |
85 boost::mutex::scoped_lock lock_; | 85 boost::mutex::scoped_lock lock_; |
86 | 86 |
87 public: | 87 public: |
88 explicit Lock(SequenceOfOperationsJob& that) : | 88 explicit Lock(SequenceOfOperationsJob& that); |
89 that_(that), | |
90 lock_(that.mutex_) | |
91 { | |
92 } | |
93 | 89 |
94 bool IsDone() const | 90 bool IsDone() const; |
95 { | |
96 return that_.done_; | |
97 } | |
98 | 91 |
99 void SetTrailingOperationTimeout(unsigned int timeout); | 92 void SetTrailingOperationTimeout(unsigned int timeout); |
100 | 93 |
101 size_t AddOperation(IJobOperation* operation); | 94 size_t AddOperation(IJobOperation* operation); |
102 | 95 |
103 size_t GetOperationsCount() const | 96 size_t GetOperationsCount() const; |
104 { | |
105 return that_.operations_.size(); | |
106 } | |
107 | 97 |
108 void AddInput(size_t index, | 98 void AddInput(size_t index, |
109 const JobOperationValue& value); | 99 const JobOperationValue& value); |
110 | 100 |
111 void Connect(size_t input, | 101 void Connect(size_t input, |
112 size_t output); | 102 size_t output); |
113 }; | 103 }; |
114 | 104 |
115 virtual void Start() ORTHANC_OVERRIDE | 105 virtual void Start() ORTHANC_OVERRIDE; |
116 { | |
117 } | |
118 | 106 |
119 virtual JobStepResult Step(const std::string& jobId) ORTHANC_OVERRIDE; | 107 virtual JobStepResult Step(const std::string& jobId) ORTHANC_OVERRIDE; |
120 | 108 |
121 virtual void Reset() ORTHANC_OVERRIDE; | 109 virtual void Reset() ORTHANC_OVERRIDE; |
122 | 110 |
123 virtual void Stop(JobStopReason reason) ORTHANC_OVERRIDE | 111 virtual void Stop(JobStopReason reason) ORTHANC_OVERRIDE; |
124 { | |
125 } | |
126 | 112 |
127 virtual float GetProgress() ORTHANC_OVERRIDE; | 113 virtual float GetProgress() ORTHANC_OVERRIDE; |
128 | 114 |
129 virtual void GetJobType(std::string& target) ORTHANC_OVERRIDE | 115 virtual void GetJobType(std::string& target) ORTHANC_OVERRIDE; |
130 { | |
131 target = "SequenceOfOperations"; | |
132 } | |
133 | 116 |
134 virtual void GetPublicContent(Json::Value& value) ORTHANC_OVERRIDE; | 117 virtual void GetPublicContent(Json::Value& value) ORTHANC_OVERRIDE; |
135 | 118 |
136 virtual bool Serialize(Json::Value& value) ORTHANC_OVERRIDE; | 119 virtual bool Serialize(Json::Value& value) ORTHANC_OVERRIDE; |
137 | 120 |
138 virtual bool GetOutput(std::string& output, | 121 virtual bool GetOutput(std::string& output, |
139 MimeType& mime, | 122 MimeType& mime, |
140 const std::string& key) ORTHANC_OVERRIDE | 123 const std::string& key); |
141 { | |
142 return false; | |
143 } | |
144 | 124 |
145 void AwakeTrailingSleep() | 125 void AwakeTrailingSleep(); |
146 { | |
147 operationAdded_.notify_one(); | |
148 } | |
149 }; | 126 }; |
150 } | 127 } |