diff OrthancServer/Search/LookupIdentifierQuery.cpp @ 1750:55d52567bebb db-changes

LookupResource implemented
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 27 Oct 2015 12:45:50 +0100
parents 99f4a05f39fa
children fb569ee09a69
line wrap: on
line diff
--- a/OrthancServer/Search/LookupIdentifierQuery.cpp	Tue Oct 27 10:54:51 2015 +0100
+++ b/OrthancServer/Search/LookupIdentifierQuery.cpp	Tue Oct 27 12:45:50 2015 +0100
@@ -203,7 +203,15 @@
                                     IDatabaseWrapper& database)
   {
     SetOfResources resources(database, level_);
-    
+    Apply(resources, database);
+
+    resources.Flatten(result);
+  }
+
+
+  void LookupIdentifierQuery::Apply(SetOfResources& result,
+                                    IDatabaseWrapper& database)
+  {
     for (size_t i = 0; i < GetSize(); i++)
     {
       std::list<int64_t> a;
@@ -217,9 +225,8 @@
         a.splice(a.end(), b);
       }
 
-      resources.Intersect(a);
+      result.Intersect(a);
     }
+  }
 
-    resources.Flatten(result);
-  }
 }