diff OrthancServer/ServerContext.cpp @ 2876:ae8e72009e64

notes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 09 Oct 2018 20:09:35 +0200
parents 8aa6aef11b70
children a27b0e9a3fd9
line wrap: on
line diff
--- a/OrthancServer/ServerContext.cpp	Tue Oct 09 16:44:28 2018 +0200
+++ b/OrthancServer/ServerContext.cpp	Tue Oct 09 20:09:35 2018 +0200
@@ -766,12 +766,14 @@
   }
 
 
-  void ServerContext::Apply(std::list<std::string>& result,
+  void ServerContext::Apply(bool& isComplete, 
+                            std::list<std::string>& result,
                             const ::Orthanc::LookupResource& lookup,
                             size_t since,
                             size_t limit)
   {
     result.clear();
+    isComplete = true;
 
     std::vector<std::string> resources, instances;
     GetIndex().FindCandidates(resources, instances, lookup);
@@ -781,6 +783,8 @@
     size_t skipped = 0;
     for (size_t i = 0; i < instances.size(); i++)
     {
+      // TODO - Don't read the full JSON from the disk if only "main
+      // DICOM tags" are to be returned
       Json::Value dicom;
       ReadDicomAsJson(dicom, instances[i]);
       
@@ -793,6 +797,7 @@
         else if (limit != 0 &&
                  result.size() >= limit)
         {
+          isComplete = false;
           return;  // too many results
         }
         else