diff OrthancServer/Sources/Database/FindRequest.h @ 5614:4640b7ae9a11 find-refactoring

moving normalization of constraints into FindRequest
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 09 May 2024 11:59:56 +0200
parents d4b570834d3a
children 1864b16bc7b1
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/FindRequest.h	Thu May 09 11:32:06 2024 +0200
+++ b/OrthancServer/Sources/Database/FindRequest.h	Thu May 09 11:59:56 2024 +0200
@@ -37,6 +37,8 @@
 
 namespace Orthanc
 {
+  class MainDicomTagsRegistry;
+
   class FindRequest : public boost::noncopyable
   {
   public:
@@ -153,11 +155,10 @@
 
 
   private:
-
     // filter & ordering fields
     ResourceType                         level_;                // The level of the response (the filtering on tags, labels and metadata also happens at this level)
     OrthancIdentifiers                   orthancIdentifiers_;   // The response must belong to this Orthanc resources hierarchy
-    std::vector<DicomTagConstraint>      dicomTagConstraints_;  // All tags filters (note: the order is not important)
+    std::deque<DatabaseConstraint>       dicomTagConstraints_;  // All tags filters (note: the order is not important)
     std::deque<void*>   /* TODO-FIND */       metadataConstraints_;  // All metadata filters (note: the order is not important)
     bool                                 hasLimits_;
     uint64_t                             limitsSince_;
@@ -181,6 +182,8 @@
     std::set<MetadataType>               retrieveChildrenMetadata_;
     bool                                 retrieveOneInstanceIdentifier_;
 
+    std::unique_ptr<MainDicomTagsRegistry>  mainDicomTagsRegistry_;
+
   public:
     explicit FindRequest(ResourceType level);
 
@@ -214,13 +217,13 @@
       return dicomTagConstraints_.size();
     }
 
+    const DatabaseConstraint& GetDicomTagConstraint(size_t index) const;
+
     size_t GetMetadataConstraintsCount() const
     {
       return metadataConstraints_.size();
     }
 
-    const DicomTagConstraint& GetDicomTagConstraint(size_t index) const;
-
     void SetLimits(uint64_t since,
                    uint64_t count);