comparison OrthancServer/Sources/Database/FindResponse.h @ 5580:df7324d6e728 find-refactoring

removed redundant FindResponse::parent_
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 27 Apr 2024 12:14:53 +0200
parents 77570cce8855
children 4ad301c35f6e
comparison
equal deleted inserted replaced
5579:77570cce8855 5580:df7324d6e728
82 class Item : public boost::noncopyable 82 class Item : public boost::noncopyable
83 { 83 {
84 private: 84 private:
85 FindRequest::ResponseContent responseContent_; // what has been requested 85 FindRequest::ResponseContent responseContent_; // what has been requested
86 ResourceType level_; 86 ResourceType level_;
87 std::string parent_; // TODO-FIND: Remove this, as it is redundant with "identifiers_" 87 OrthancIdentifiers identifiers_;
88 OrthancIdentifiers identifiers_; // TODO-FIND: not convenient to use here. A simple resourceId seems enough
89 std::unique_ptr<DicomMap> dicomMap_; 88 std::unique_ptr<DicomMap> dicomMap_;
90 std::list<std::string> children_; 89 std::list<std::string> children_;
91 std::string childInstanceId_; 90 std::string childInstanceId_;
92 std::set<std::string> labels_; 91 std::set<std::string> labels_;
93 std::map<MetadataType, std::string> metadata_; 92 std::map<MetadataType, std::string> metadata_;
160 const std::list<std::string>& GetChildren() const 159 const std::list<std::string>& GetChildren() const
161 { 160 {
162 return children_; 161 return children_;
163 } 162 }
164 163
165 void SetParent(const std::string& parent)
166 {
167 parent_ = parent;
168 }
169
170 const std::string& GetParent() const
171 {
172 return parent_;
173 }
174
175 void AddLabel(const std::string& label) 164 void AddLabel(const std::string& label)
176 { 165 {
177 labels_.insert(label); 166 labels_.insert(label);
178 } 167 }
179 168
202 } 191 }
203 192
204 return false; 193 return false;
205 } 194 }
206 195
196 void SetIdentifier(ResourceType level,
197 const std::string& id)
198 {
199 identifiers_.SetLevel(level, id);
200 }
201
207 // TODO-FIND: add other getters and setters 202 // TODO-FIND: add other getters and setters
208 }; 203 };
209 204
210 private: 205 private:
211 std::deque<Item*> items_; 206 std::deque<Item*> items_;