comparison 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
comparison
equal deleted inserted replaced
1755:39c37a994b2f 1756:03b030680e3d
35 35
36 #include "../../Core/Toolbox.h" 36 #include "../../Core/Toolbox.h"
37 37
38 namespace Orthanc 38 namespace Orthanc
39 { 39 {
40 RangeConstraint::RangeConstraint(const DicomTag& tag, 40 RangeConstraint::RangeConstraint(const std::string& lower,
41 const std::string& lower,
42 const std::string& upper, 41 const std::string& upper,
43 bool isCaseSensitive) : 42 bool isCaseSensitive) :
44 IFindConstraint(tag),
45 lower_(lower), 43 lower_(lower),
46 upper_(upper), 44 upper_(upper),
47 isCaseSensitive_(isCaseSensitive) 45 isCaseSensitive_(isCaseSensitive)
48 { 46 {
49 if (!isCaseSensitive_) 47 if (!isCaseSensitive_)
52 Toolbox::ToUpperCase(upper_); 50 Toolbox::ToUpperCase(upper_);
53 } 51 }
54 } 52 }
55 53
56 54
57 void RangeConstraint::Setup(LookupIdentifierQuery& lookup) const 55 void RangeConstraint::Setup(LookupIdentifierQuery& lookup,
56 const DicomTag& tag) const
58 { 57 {
59 lookup.AddConstraint(GetTag(), IdentifierConstraintType_GreaterOrEqual, lower_); 58 lookup.AddConstraint(tag, IdentifierConstraintType_GreaterOrEqual, lower_);
60 lookup.AddConstraint(GetTag(), IdentifierConstraintType_SmallerOrEqual, upper_); 59 lookup.AddConstraint(tag, IdentifierConstraintType_SmallerOrEqual, upper_);
61 } 60 }
62 61
63 62
64 bool RangeConstraint::Match(const std::string& value) const 63 bool RangeConstraint::Match(const std::string& value) const
65 { 64 {