Mercurial > hg > orthanc
comparison OrthancServer/Search/LookupIdentifierQuery.h @ 2121:7e8889bc95c6
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 07 Nov 2016 11:28:12 +0100 |
parents | b1291df2f780 |
children | a3a65de1840f |
comparison
equal
deleted
inserted
replaced
2120:4b02ec79728a | 2121:7e8889bc95c6 |
---|---|
30 **/ | 30 **/ |
31 | 31 |
32 | 32 |
33 #pragma once | 33 #pragma once |
34 | 34 |
35 #include "../ServerEnumerations.h" | 35 #include "../ServerToolbox.h" |
36 #include "../IDatabaseWrapper.h" | 36 #include "../IDatabaseWrapper.h" |
37 | 37 |
38 #include "SetOfResources.h" | 38 #include "SetOfResources.h" |
39 | 39 |
40 #include <vector> | 40 #include <vector> |
76 Constraint(const DicomTag& tag, | 76 Constraint(const DicomTag& tag, |
77 IdentifierConstraintType type, | 77 IdentifierConstraintType type, |
78 const std::string& value) : | 78 const std::string& value) : |
79 tag_(tag), | 79 tag_(tag), |
80 type_(type), | 80 type_(type), |
81 value_(NormalizeIdentifier(value)) | 81 value_(ServerToolbox::NormalizeIdentifier(value)) |
82 { | 82 { |
83 } | 83 } |
84 | 84 |
85 const DicomTag& GetTag() const | 85 const DicomTag& GetTag() const |
86 { | 86 { |
136 | 136 |
137 ~LookupIdentifierQuery(); | 137 ~LookupIdentifierQuery(); |
138 | 138 |
139 bool IsIdentifier(const DicomTag& tag) | 139 bool IsIdentifier(const DicomTag& tag) |
140 { | 140 { |
141 return IsIdentifier(tag, level_); | 141 return ServerToolbox::IsIdentifier(tag, level_); |
142 } | 142 } |
143 | 143 |
144 void AddConstraint(DicomTag tag, | 144 void AddConstraint(DicomTag tag, |
145 IdentifierConstraintType type, | 145 IdentifierConstraintType type, |
146 const std::string& value); | 146 const std::string& value); |
162 IDatabaseWrapper& database); | 162 IDatabaseWrapper& database); |
163 | 163 |
164 void Apply(SetOfResources& result, | 164 void Apply(SetOfResources& result, |
165 IDatabaseWrapper& database); | 165 IDatabaseWrapper& database); |
166 | 166 |
167 static void LoadIdentifiers(const DicomTag*& tags, | |
168 size_t& size, | |
169 ResourceType level); | |
170 | |
171 static bool IsIdentifier(const DicomTag& tag, | |
172 ResourceType level); | |
173 | |
174 static void StoreIdentifiers(IDatabaseWrapper& database, | |
175 int64_t resource, | |
176 ResourceType level, | |
177 const DicomMap& map); | |
178 | |
179 static std::string NormalizeIdentifier(const std::string& value); | |
180 | |
181 void Print(std::ostream& s) const; | 167 void Print(std::ostream& s) const; |
182 }; | 168 }; |
183 } | 169 } |