Mercurial > hg > orthanc
comparison OrthancServer/Search/LookupIdentifierQuery.h @ 3001:7695a9c81099
refactoring /tools/find using LookupResource::IVisitor
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 11 Dec 2018 18:36:38 +0100 |
parents | e583478e0c6c |
children | 4e43e67f8ecf |
comparison
equal
deleted
inserted
replaced
2998:0a52af0c66e7 | 3001:7695a9c81099 |
---|---|
31 **/ | 31 **/ |
32 | 32 |
33 | 33 |
34 #pragma once | 34 #pragma once |
35 | 35 |
36 #include "../ServerToolbox.h" | |
37 #include "../IDatabaseWrapper.h" | 36 #include "../IDatabaseWrapper.h" |
38 | 37 |
39 #include "SetOfResources.h" | 38 #include "SetOfResources.h" |
40 | 39 |
41 #include <vector> | 40 #include <vector> |
77 std::string value_; | 76 std::string value_; |
78 | 77 |
79 public: | 78 public: |
80 SingleConstraint(const DicomTag& tag, | 79 SingleConstraint(const DicomTag& tag, |
81 IdentifierConstraintType type, | 80 IdentifierConstraintType type, |
82 const std::string& value) : | 81 const std::string& value); |
83 tag_(tag), | |
84 type_(type), | |
85 value_(ServerToolbox::NormalizeIdentifier(value)) | |
86 { | |
87 } | |
88 | 82 |
89 const DicomTag& GetTag() const | 83 const DicomTag& GetTag() const |
90 { | 84 { |
91 return tag_; | 85 return tag_; |
92 } | 86 } |
111 std::string end_; | 105 std::string end_; |
112 | 106 |
113 public: | 107 public: |
114 RangeConstraint(const DicomTag& tag, | 108 RangeConstraint(const DicomTag& tag, |
115 const std::string& start, | 109 const std::string& start, |
116 const std::string& end) : | 110 const std::string& end); |
117 tag_(tag), | |
118 start_(ServerToolbox::NormalizeIdentifier(start)), | |
119 end_(ServerToolbox::NormalizeIdentifier(end)) | |
120 { | |
121 } | |
122 | 111 |
123 const DicomTag& GetTag() const | 112 const DicomTag& GetTag() const |
124 { | 113 { |
125 return tag_; | 114 return tag_; |
126 } | 115 } |
187 { | 176 { |
188 } | 177 } |
189 | 178 |
190 ~LookupIdentifierQuery(); | 179 ~LookupIdentifierQuery(); |
191 | 180 |
192 bool IsIdentifier(const DicomTag& tag) | 181 bool IsIdentifier(const DicomTag& tag); |
193 { | |
194 return ServerToolbox::IsIdentifier(tag, level_); | |
195 } | |
196 | 182 |
197 void AddConstraint(DicomTag tag, | 183 void AddConstraint(DicomTag tag, |
198 IdentifierConstraintType type, | 184 IdentifierConstraintType type, |
199 const std::string& value); | 185 const std::string& value); |
200 | 186 |