diff OrthancServer/ServerJobs/ResourceModificationJob.h @ 2868:abce036683cd

sharing code within OrthancRestAnonymizeModify
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 08 Oct 2018 17:05:19 +0200
parents 8b00e4cb4a6b
children 4e43e67f8ecf
line wrap: on
line diff
--- a/OrthancServer/ServerJobs/ResourceModificationJob.h	Mon Oct 08 16:08:51 2018 +0200
+++ b/OrthancServer/ServerJobs/ResourceModificationJob.h	Mon Oct 08 17:05:19 2018 +0200
@@ -40,32 +40,9 @@
 {
   class ResourceModificationJob : public SetOfInstancesJob
   {
-  public:
-    class Output : public boost::noncopyable
-    {
-    private:
-      boost::mutex  mutex_;
-      ResourceType  level_;
-      bool          isFirst_;
-      std::string   id_;
-      std::string   patientId_;
-
-    public:
-      Output(ResourceType  level);
-
-      ResourceType GetLevel() const
-      {
-        return level_;
-      }
-
-      void Update(DicomInstanceHasher& hasher);
-
-      bool Format(Json::Value& target);
-
-      bool GetIdentifier(std::string& id);
-    };
+  private:
+    class Output;
     
-  private:
     ServerContext&                    context_;
     std::auto_ptr<DicomModification>  modification_;
     boost::shared_ptr<Output>         output_;
@@ -88,10 +65,9 @@
                             const Json::Value& serialized);
 
     void SetModification(DicomModification* modification,   // Takes ownership
+                         ResourceType level,
                          bool isAnonymization);
 
-    void SetOutput(boost::shared_ptr<Output>& output);
-
     void SetOrigin(const DicomInstanceOrigin& origin);
 
     void SetOrigin(const RestApiCall& call);