Mercurial > hg > orthanc
comparison OrthancServer/Search/ValueConstraint.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 | b1291df2f780 |
comparison
equal
deleted
inserted
replaced
1755:39c37a994b2f | 1756:03b030680e3d |
---|---|
37 | 37 |
38 #include <stdio.h> | 38 #include <stdio.h> |
39 | 39 |
40 namespace Orthanc | 40 namespace Orthanc |
41 { | 41 { |
42 ValueConstraint::ValueConstraint(const DicomTag& tag, | 42 ValueConstraint::ValueConstraint(const std::string& value, |
43 const std::string& value, | |
44 bool isCaseSensitive) : | 43 bool isCaseSensitive) : |
45 IFindConstraint(tag), | |
46 value_(value), | 44 value_(value), |
47 isCaseSensitive_(isCaseSensitive) | 45 isCaseSensitive_(isCaseSensitive) |
48 { | 46 { |
49 if (!isCaseSensitive) | 47 if (!isCaseSensitive) |
50 { | 48 { |
51 Toolbox::ToUpperCase(value_); | 49 Toolbox::ToUpperCase(value_); |
52 } | 50 } |
53 } | 51 } |
54 | 52 |
55 | 53 |
56 void ValueConstraint::Setup(LookupIdentifierQuery& lookup) const | 54 void ValueConstraint::Setup(LookupIdentifierQuery& lookup, |
55 const DicomTag& tag) const | |
57 { | 56 { |
58 lookup.AddConstraint(GetTag(), IdentifierConstraintType_Equal, value_); | 57 lookup.AddConstraint(tag, IdentifierConstraintType_Equal, value_); |
59 } | 58 } |
60 | 59 |
61 bool ValueConstraint::Match(const std::string& value) const | 60 bool ValueConstraint::Match(const std::string& value) const |
62 { | 61 { |
63 if (isCaseSensitive_) | 62 if (isCaseSensitive_) |