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

LookupResource implemented
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 27 Oct 2015 12:45:50 +0100
parents ca69082ab200
children fb569ee09a69
line wrap: on
line diff
--- a/OrthancServer/Search/SetOfResources.cpp	Tue Oct 27 10:54:51 2015 +0100
+++ b/OrthancServer/Search/SetOfResources.cpp	Tue Oct 27 12:45:50 2015 +0100
@@ -130,4 +130,24 @@
       }
     }
   }
+
+
+  void SetOfResources::Flatten(std::list<int64_t>& result)
+  {
+    result.clear();
+      
+    if (resources_.get() == NULL)
+    {
+      // All the resources of this level are part of the filter
+      database_.GetAllInternalIds(result, level_);
+    }
+    else
+    {
+      for (Resources::const_iterator it = resources_->begin(); 
+           it != resources_->end(); ++it)
+      {
+        result.push_back(*it);
+      }
+    }
+  }
 }