comparison OrthancServer/ServerJobs/DicomMoveScuJob.cpp @ 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 5ff5d5a0fd28
children 138d0dde41b5
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.
44 namespace Orthanc 44 namespace Orthanc
45 { 45 {
46 class DicomMoveScuJob::Command : public SetOfCommandsJob::ICommand 46 class DicomMoveScuJob::Command : public SetOfCommandsJob::ICommand
47 { 47 {
48 private: 48 private:
49 DicomMoveScuJob& that_; 49 DicomMoveScuJob& that_;
50 std::auto_ptr<DicomMap> findAnswer_; 50 std::unique_ptr<DicomMap> findAnswer_;
51 51
52 public: 52 public:
53 Command(DicomMoveScuJob& that, 53 Command(DicomMoveScuJob& that,
54 const DicomMap& findAnswer) : 54 const DicomMap& findAnswer) :
55 that_(that), 55 that_(that),
56 findAnswer_(findAnswer.Clone()) 56 findAnswer_(findAnswer.Clone())
57 { 57 {
58 } 58 }
59 59
60 virtual bool Execute() 60 virtual bool Execute(const std::string& jobId) ORTHANC_OVERRIDE
61 { 61 {
62 that_.Retrieve(*findAnswer_); 62 that_.Retrieve(*findAnswer_);
63 return true; 63 return true;
64 } 64 }
65 65
66 virtual void Serialize(Json::Value& target) const 66 virtual void Serialize(Json::Value& target) const ORTHANC_OVERRIDE
67 { 67 {
68 findAnswer_->Serialize(target); 68 findAnswer_->Serialize(target);
69 } 69 }
70 }; 70 };
71 71