diff OrthancServer/Search/RangeConstraint.cpp @ 1756:03b030680e3d db-changes

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 28 Oct 2015 12:14:06 +0100
parents 3a4f7dc00f49
children 5e0a25642056
line wrap: on
line diff
--- a/OrthancServer/Search/RangeConstraint.cpp	Wed Oct 28 12:02:15 2015 +0100
+++ b/OrthancServer/Search/RangeConstraint.cpp	Wed Oct 28 12:14:06 2015 +0100
@@ -37,11 +37,9 @@
 
 namespace Orthanc
 {
-  RangeConstraint::RangeConstraint(const DicomTag& tag, 
-                                   const std::string& lower,
+  RangeConstraint::RangeConstraint(const std::string& lower,
                                    const std::string& upper,
                                    bool isCaseSensitive) : 
-    IFindConstraint(tag),
     lower_(lower),
     upper_(upper),
     isCaseSensitive_(isCaseSensitive)
@@ -54,10 +52,11 @@
   }
 
 
-  void RangeConstraint::Setup(LookupIdentifierQuery& lookup) const
+  void RangeConstraint::Setup(LookupIdentifierQuery& lookup,
+                              const DicomTag& tag) const
   {
-    lookup.AddConstraint(GetTag(), IdentifierConstraintType_GreaterOrEqual, lower_);
-    lookup.AddConstraint(GetTag(), IdentifierConstraintType_SmallerOrEqual, upper_);
+    lookup.AddConstraint(tag, IdentifierConstraintType_GreaterOrEqual, lower_);
+    lookup.AddConstraint(tag, IdentifierConstraintType_SmallerOrEqual, upper_);
   }