Mercurial > hg > orthanc
diff OrthancServer/Sources/Database/FindResponse.h @ 5588:1b0fc6685f57 find-refactoring
add index of resources into FindResponse
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 03 May 2024 17:20:27 +0200 |
parents | 0f5586c498d1 |
children | b51ee994cd6f |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/FindResponse.h Fri May 03 17:06:42 2024 +0200 +++ b/OrthancServer/Sources/Database/FindResponse.h Fri May 03 17:20:27 2024 +0200 @@ -109,6 +109,11 @@ { } + ResourceType GetLevel() const + { + return level_; + } + const std::string& GetIdentifier() const { return identifier_; @@ -204,6 +209,16 @@ const Item& GetItem(size_t index) const; - const Item* LookupItem(const std::string& id) const; + Item& GetItem(const std::string& id); + + const Item& GetItem(const std::string& id) const + { + return const_cast<FindResponse&>(*this).GetItem(id); + } + + bool HasItem(const std::string& id) const + { + return (index_.find(id) != index_.end()); + } }; }