diff Core/JobsEngine/SetOfInstancesJob.cpp @ 2657:5eea2f11e8df jobs

JobsSerialization.GenericJobs
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 06 Jun 2018 16:52:42 +0200
parents a6d3e45eeff5
children 228e2783ce83
line wrap: on
line diff
--- a/Core/JobsEngine/SetOfInstancesJob.cpp	Tue Jun 05 18:25:23 2018 +0200
+++ b/Core/JobsEngine/SetOfInstancesJob.cpp	Wed Jun 06 16:52:42 2018 +0200
@@ -114,6 +114,19 @@
   }
 
 
+  const std::string& SetOfInstancesJob::GetInstance(size_t index) const
+  {
+    if (index > instances_.size())
+    {
+      throw OrthancException(ErrorCode_ParameterOutOfRange);
+    }
+    else
+    {
+      return instances_[index];
+    }
+  }
+      
+
   JobStepResult SetOfInstancesJob::ExecuteStep()
   {
     if (!started_)
@@ -182,8 +195,8 @@
   void SetOfInstancesJob::GetPublicContent(Json::Value& value)
   {
     value["Description"] = GetDescription();
-    value["InstancesCount"] = static_cast<uint32_t>(GetInstances().size());
-    value["FailedInstancesCount"] = static_cast<uint32_t>(GetFailedInstances().size());
+    value["InstancesCount"] = static_cast<uint32_t>(instances_.size());
+    value["FailedInstancesCount"] = static_cast<uint32_t>(failedInstances_.size());
   }