Mercurial > hg > orthanc
comparison OrthancServer/Scheduler/ServerCommandInstance.cpp @ 1009:26642cecd36d lua-scripting
clearer job interface
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Jul 2014 16:11:44 +0200 |
parents | f3929718ea7e |
children | 6e7e5ed91c2d |
comparison
equal
deleted
inserted
replaced
1008:187ed107a59f | 1009:26642cecd36d |
---|---|
42 | 42 |
43 bool success = false; | 43 bool success = false; |
44 | 44 |
45 try | 45 try |
46 { | 46 { |
47 if (filter_->Apply(outputs, inputs_)) | 47 if (command_->Apply(outputs, inputs_)) |
48 { | 48 { |
49 success = true; | 49 success = true; |
50 } | 50 } |
51 } | 51 } |
52 catch (OrthancException&) | 52 catch (OrthancException&) |
72 listener.SignalSuccess(jobId_); | 72 listener.SignalSuccess(jobId_); |
73 return true; | 73 return true; |
74 } | 74 } |
75 | 75 |
76 | 76 |
77 ServerCommandInstance::ServerCommandInstance(IServerCommand *filter, | 77 ServerCommandInstance::ServerCommandInstance(IServerCommand *command, |
78 const std::string& jobId) : | 78 const std::string& jobId) : |
79 filter_(filter), | 79 command_(command), |
80 jobId_(jobId) | 80 jobId_(jobId), |
81 connectedToSink_(false) | |
81 { | 82 { |
82 if (filter_ == NULL) | 83 if (command_ == NULL) |
83 { | 84 { |
84 throw OrthancException(ErrorCode_ParameterOutOfRange); | 85 throw OrthancException(ErrorCode_ParameterOutOfRange); |
85 } | 86 } |
86 } | 87 } |
87 | 88 |
88 | 89 |
89 ServerCommandInstance::~ServerCommandInstance() | 90 ServerCommandInstance::~ServerCommandInstance() |
90 { | 91 { |
91 if (filter_ != NULL) | 92 if (command_ != NULL) |
92 { | 93 { |
93 delete filter_; | 94 delete command_; |
94 } | 95 } |
95 } | 96 } |
96 } | 97 } |