diff OrthancServer/ServerJobs/Operations/SystemCallOperation.cpp @ 2656:a6d3e45eeff5 jobs

SerializationToolbox
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 05 Jun 2018 18:25:23 +0200
parents c196d76cb8fa
children c27f7ecf9b54
line wrap: on
line diff
--- a/OrthancServer/ServerJobs/Operations/SystemCallOperation.cpp	Tue Jun 05 17:57:49 2018 +0200
+++ b/OrthancServer/ServerJobs/Operations/SystemCallOperation.cpp	Tue Jun 05 18:25:23 2018 +0200
@@ -38,6 +38,7 @@
 
 #include "../../../Core/JobsEngine/Operations/StringOperationValue.h"
 #include "../../../Core/Logging.h"
+#include "../../../Core/SerializationToolbox.h"
 #include "../../../Core/TemporaryFile.h"
 #include "../../../Core/Toolbox.h"
 
@@ -118,20 +119,20 @@
     result = Json::objectValue;
     result["Type"] = "SystemCall";
     result["Command"] = command_;
-    IJobUnserializer::WriteArrayOfStrings(result, preArguments_, "PreArguments");
-    IJobUnserializer::WriteArrayOfStrings(result, postArguments_, "PostArguments");
+    SerializationToolbox::WriteArrayOfStrings(result, preArguments_, "PreArguments");
+    SerializationToolbox::WriteArrayOfStrings(result, postArguments_, "PostArguments");
   }
 
 
   SystemCallOperation::SystemCallOperation(const Json::Value& serialized)
   {
-    if (IJobUnserializer::ReadString(serialized, "Type") != "SystemCall")
+    if (SerializationToolbox::ReadString(serialized, "Type") != "SystemCall")
     {
       throw OrthancException(ErrorCode_BadFileFormat);
     }
 
-    command_ = IJobUnserializer::ReadString(serialized, "Command");
-    IJobUnserializer::ReadArrayOfStrings(preArguments_, serialized, "PreArguments");
-    IJobUnserializer::ReadArrayOfStrings(postArguments_, serialized, "PostArguments");
+    command_ = SerializationToolbox::ReadString(serialized, "Command");
+    SerializationToolbox::ReadArrayOfStrings(preArguments_, serialized, "PreArguments");
+    SerializationToolbox::ReadArrayOfStrings(postArguments_, serialized, "PostArguments");
   }
 }