Mercurial > hg > orthanc-stone
comparison Framework/Oracle/GenericOracleRunner.cpp @ 1128:8e3763d1736a broker
removing CustomOracleCommand
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 05 Nov 2019 22:39:25 +0100 |
parents | a8bf81756839 |
children | 87fbeb823375 |
comparison
equal
deleted
inserted
replaced
1127:3308ef083297 | 1128:8e3763d1736a |
---|---|
23 | 23 |
24 #if !defined(ORTHANC_ENABLE_DCMTK) | 24 #if !defined(ORTHANC_ENABLE_DCMTK) |
25 # error The macro ORTHANC_ENABLE_DCMTK must be defined | 25 # error The macro ORTHANC_ENABLE_DCMTK must be defined |
26 #endif | 26 #endif |
27 | 27 |
28 #include "CustomOracleCommand.h" | |
29 #include "GetOrthancImageCommand.h" | 28 #include "GetOrthancImageCommand.h" |
30 #include "GetOrthancWebViewerJpegCommand.h" | 29 #include "GetOrthancWebViewerJpegCommand.h" |
31 #include "HttpCommand.h" | 30 #include "HttpCommand.h" |
32 #include "OracleCommandExceptionMessage.h" | 31 #include "OracleCommandExceptionMessage.h" |
33 #include "OrthancRestApiCommand.h" | 32 #include "OrthancRestApiCommand.h" |
212 return c.string(); | 211 return c.string(); |
213 } | 212 } |
214 | 213 |
215 | 214 |
216 static IMessage* Execute(const std::string& root, | 215 static IMessage* Execute(const std::string& root, |
217 const ReadFileCommand& command) | 216 ReadFileCommand& command) |
218 { | 217 { |
219 std::string path = GetPath(root, command.GetPath()); | 218 std::string path = GetPath(root, command.GetPath()); |
220 | 219 |
221 std::string content; | 220 std::string content; |
222 Orthanc::SystemToolbox::ReadFile(content, path, true /* log */); | 221 Orthanc::SystemToolbox::ReadFile(content, path, true /* log */); |
346 return Execute(orthanc_, dynamic_cast<const GetOrthancImageCommand&>(command)); | 345 return Execute(orthanc_, dynamic_cast<const GetOrthancImageCommand&>(command)); |
347 | 346 |
348 case IOracleCommand::Type_GetOrthancWebViewerJpeg: | 347 case IOracleCommand::Type_GetOrthancWebViewerJpeg: |
349 return Execute(orthanc_, dynamic_cast<const GetOrthancWebViewerJpegCommand&>(command)); | 348 return Execute(orthanc_, dynamic_cast<const GetOrthancWebViewerJpegCommand&>(command)); |
350 | 349 |
351 case IOracleCommand::Type_Custom: | |
352 return dynamic_cast<CustomOracleCommand&>(command).Execute(*this); | |
353 | |
354 case IOracleCommand::Type_ReadFile: | 350 case IOracleCommand::Type_ReadFile: |
355 return Execute(rootDirectory_, dynamic_cast<const ReadFileCommand&>(command)); | 351 return Execute(rootDirectory_, dynamic_cast<ReadFileCommand&>(command)); |
356 | 352 |
357 case IOracleCommand::Type_ParseDicomFile: | 353 case IOracleCommand::Type_ParseDicomFile: |
358 #if ORTHANC_ENABLE_DCMTK == 1 | 354 #if ORTHANC_ENABLE_DCMTK == 1 |
359 return Execute(dicomCache_, rootDirectory_, | 355 return Execute(dicomCache_, rootDirectory_, |
360 dynamic_cast<const ParseDicomFileCommand&>(command)); | 356 dynamic_cast<const ParseDicomFileCommand&>(command)); |