Mercurial > hg > orthanc
comparison OrthancServer/Sources/ServerJobs/Operations/SystemCallOperation.cpp @ 4310:2ae905070221
renaming pure interface JobOperationValue as IJobOperationValue
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 09 Nov 2020 14:40:51 +0100 |
parents | 05b8fd21089c |
children | d9473bd5ed43 |
comparison
equal
deleted
inserted
replaced
4309:73de065622ec | 4310:2ae905070221 |
---|---|
72 } | 72 } |
73 } | 73 } |
74 | 74 |
75 | 75 |
76 void SystemCallOperation::Apply(JobOperationValues& outputs, | 76 void SystemCallOperation::Apply(JobOperationValues& outputs, |
77 const JobOperationValue& input) | 77 const IJobOperationValue& input) |
78 { | 78 { |
79 std::vector<std::string> arguments = preArguments_; | 79 std::vector<std::string> arguments = preArguments_; |
80 | 80 |
81 arguments.reserve(arguments.size() + postArguments_.size() + 1); | 81 arguments.reserve(arguments.size() + postArguments_.size() + 1); |
82 | 82 |
83 std::unique_ptr<TemporaryFile> tmp; | 83 std::unique_ptr<TemporaryFile> tmp; |
84 | 84 |
85 switch (input.GetType()) | 85 switch (input.GetType()) |
86 { | 86 { |
87 case JobOperationValue::Type_DicomInstance: | 87 case IJobOperationValue::Type_DicomInstance: |
88 { | 88 { |
89 const DicomInstanceOperationValue& instance = | 89 const DicomInstanceOperationValue& instance = |
90 dynamic_cast<const DicomInstanceOperationValue&>(input); | 90 dynamic_cast<const DicomInstanceOperationValue&>(input); |
91 | 91 |
92 std::string dicom; | 92 std::string dicom; |
101 | 101 |
102 arguments.push_back(tmp->GetPath()); | 102 arguments.push_back(tmp->GetPath()); |
103 break; | 103 break; |
104 } | 104 } |
105 | 105 |
106 case JobOperationValue::Type_String: | 106 case IJobOperationValue::Type_String: |
107 { | 107 { |
108 const StringOperationValue& value = | 108 const StringOperationValue& value = |
109 dynamic_cast<const StringOperationValue&>(input); | 109 dynamic_cast<const StringOperationValue&>(input); |
110 | 110 |
111 arguments.push_back(value.GetContent()); | 111 arguments.push_back(value.GetContent()); |
112 break; | 112 break; |
113 } | 113 } |
114 | 114 |
115 case JobOperationValue::Type_Null: | 115 case IJobOperationValue::Type_Null: |
116 break; | 116 break; |
117 | 117 |
118 default: | 118 default: |
119 throw OrthancException(ErrorCode_BadParameterType); | 119 throw OrthancException(ErrorCode_BadParameterType); |
120 } | 120 } |