comparison OrthancServer/Sources/Database/FindRequest.cpp @ 5834:79a497908b04 attach-custom-data tip

merged find-refactoring -> attach-custom-data
author Alain Mazy <am@orthanc.team>
date Wed, 09 Oct 2024 11:06:20 +0200
parents 7030fa489669
children
comparison
equal deleted inserted replaced
5824:79ac3924eff8 5834:79a497908b04
98 } 98 }
99 99
100 100
101 FindRequest::~FindRequest() 101 FindRequest::~FindRequest()
102 { 102 {
103
104 for (std::deque<Ordering*>::iterator it = ordering_.begin(); it != ordering_.end(); ++it) 103 for (std::deque<Ordering*>::iterator it = ordering_.begin(); it != ordering_.end(); ++it)
104 {
105 assert(*it != NULL);
106 delete *it;
107 }
108
109 for (std::deque<DatabaseMetadataConstraint*>::iterator it = metadataConstraints_.begin(); it != metadataConstraints_.end(); ++it)
105 { 110 {
106 assert(*it != NULL); 111 assert(*it != NULL);
107 delete *it; 112 delete *it;
108 } 113 }
109 } 114 }
231 { 236 {
232 ordering_.push_back(new Ordering(Key(metadataType), direction)); 237 ordering_.push_back(new Ordering(Key(metadataType), direction));
233 } 238 }
234 239
235 240
241 void FindRequest::AddMetadataConstraint(DatabaseMetadataConstraint* constraint)
242 {
243 metadataConstraints_.push_back(constraint);
244 }
245
246
236 void FindRequest::SetRetrieveParentIdentifier(bool retrieve) 247 void FindRequest::SetRetrieveParentIdentifier(bool retrieve)
237 { 248 {
238 if (level_ == ResourceType_Patient) 249 if (level_ == ResourceType_Patient)
239 { 250 {
240 throw OrthancException(ErrorCode_BadParameterType); 251 throw OrthancException(ErrorCode_BadParameterType);