Mercurial > hg > orthanc
diff OrthancServer/Sources/Database/FindResponse.h @ 5594:a906dc19264c find-refactoring
created FindResponse::Resource::Format()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 04 May 2024 15:25:19 +0200 |
parents | 1e2631b8b9af |
children | a87f2a56257d |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/FindResponse.h Sat May 04 11:35:34 2024 +0200 +++ b/OrthancServer/Sources/Database/FindResponse.h Sat May 04 15:25:19 2024 +0200 @@ -77,6 +77,11 @@ ChildrenAtLevel& GetChildrenAtLevel(ResourceType level); + const ChildrenAtLevel& GetChildrenAtLevel(ResourceType level) const + { + return const_cast<Resource&>(*this).GetChildrenAtLevel(level); + } + public: Resource(ResourceType level, const std::string& identifier) : @@ -127,6 +132,11 @@ void AddLabel(const std::string& label); + std::set<std::string>& GetLabels() + { + return labels_; + } + const std::set<std::string>& GetLabels() const { return labels_; @@ -135,6 +145,11 @@ void AddMetadata(MetadataType metadata, const std::string& value); + std::map<MetadataType, std::string>& GetMetadata() + { + return metadata_; + } + const std::map<MetadataType, std::string>& GetMetadata() const { return metadata_; @@ -154,6 +169,9 @@ bool LookupAttachment(FileInfo& target, FileContentType type) const; + + void Format(Json::Value& target, + const FindRequest& request) const; }; private: