comparison OrthancServer/Sources/Database/Compatibility/GenericFind.cpp @ 5589:b51ee994cd6f find-refactoring

renamed FindResponse::Item as FindResponse::Resource
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 03 May 2024 17:26:06 +0200
parents fc3914c07dd3
children 8b32213af23e
comparison
equal deleted inserted replaced
5588:1b0fc6685f57 5589:b51ee994cd6f
57 transaction_.GetAllPublicIds(ids, request.GetLevel()); 57 transaction_.GetAllPublicIds(ids, request.GetLevel());
58 } 58 }
59 59
60 for (std::list<std::string>::const_iterator it = ids.begin(); it != ids.end(); ++it) 60 for (std::list<std::string>::const_iterator it = ids.begin(); it != ids.end(); ++it)
61 { 61 {
62 response.Add(new FindResponse::Item(request.GetLevel(), *it)); 62 response.Add(new FindResponse::Resource(request.GetLevel(), *it));
63 } 63 }
64 } 64 }
65 else 65 else
66 { 66 {
67 throw OrthancException(ErrorCode_NotImplemented); 67 throw OrthancException(ErrorCode_NotImplemented);
72 * Sanity checks 72 * Sanity checks
73 **/ 73 **/
74 74
75 for (size_t i = 0; i < response.GetSize(); i++) 75 for (size_t i = 0; i < response.GetSize(); i++)
76 { 76 {
77 const FindResponse::Item& item = response.GetItem(i); 77 const FindResponse::Resource& resource = response.GetResource(i);
78 78
79 if (request.HasResponseContent(FindRequest::ResponseContent_MainDicomTags)) 79 if (request.HasResponseContent(FindRequest::ResponseContent_MainDicomTags))
80 { 80 {
81 DicomMap tmp; 81 DicomMap tmp;
82 item.GetDicomTagsAtLevel(tmp, request.GetLevel()); 82 resource.GetDicomTagsAtLevel(tmp, request.GetLevel());
83 if (tmp.GetSize() == 0) 83 if (tmp.GetSize() == 0)
84 { 84 {
85 throw OrthancException(ErrorCode_InternalError); 85 throw OrthancException(ErrorCode_InternalError);
86 } 86 }
87 } 87 }