Mercurial > hg > orthanc
diff OrthancServer/Sources/Database/FindResponse.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 | 1b0fc6685f57 |
children | 1e2631b8b9af |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/FindResponse.cpp Fri May 03 17:20:27 2024 +0200 +++ b/OrthancServer/Sources/Database/FindResponse.cpp Fri May 03 17:26:06 2024 +0200 @@ -152,7 +152,7 @@ } - FindResponse::DicomTagsAtLevel& FindResponse::Item::GetDicomTagsAtLevel(ResourceType level) + FindResponse::DicomTagsAtLevel& FindResponse::Resource::GetDicomTagsAtLevel(ResourceType level) { switch (level) { @@ -174,7 +174,7 @@ } - FindResponse::ChildrenAtLevel& FindResponse::Item::GetChildrenAtLevel(ResourceType level) + FindResponse::ChildrenAtLevel& FindResponse::Resource::GetChildrenAtLevel(ResourceType level) { switch (level) { @@ -217,8 +217,8 @@ } - void FindResponse::Item::AddMetadata(MetadataType metadata, - const std::string& value) + void FindResponse::Resource::AddMetadata(MetadataType metadata, + const std::string& value) { if (metadata_.find(metadata) != metadata_.end()) { @@ -231,8 +231,8 @@ } - bool FindResponse::Item::LookupMetadata(std::string& value, - MetadataType metadata) const + bool FindResponse::Resource::LookupMetadata(std::string& value, + MetadataType metadata) const { std::map<MetadataType, std::string>::const_iterator found = metadata_.find(metadata); @@ -248,7 +248,7 @@ } - void FindResponse::Item::ListMetadata(std::set<MetadataType>& target) const + void FindResponse::Resource::ListMetadata(std::set<MetadataType>& target) const { target.clear(); @@ -258,7 +258,7 @@ } } - const std::string& FindResponse::Item::GetParentIdentifier() const + const std::string& FindResponse::Resource::GetParentIdentifier() const { if (level_ == ResourceType_Patient) { @@ -275,7 +275,7 @@ } - void FindResponse::Item::SetParentIdentifier(const std::string& id) + void FindResponse::Resource::SetParentIdentifier(const std::string& id) { if (level_ == ResourceType_Patient) { @@ -292,7 +292,7 @@ } - bool FindResponse::Item::HasParentIdentifier() const + bool FindResponse::Resource::HasParentIdentifier() const { if (level_ == ResourceType_Patient) { @@ -305,7 +305,7 @@ } - void FindResponse::Item::AddLabel(const std::string& label) + void FindResponse::Resource::AddLabel(const std::string& label) { if (labels_.find(label) == labels_.end()) { @@ -318,7 +318,7 @@ } - void FindResponse::Item::AddAttachment(const FileInfo& attachment) + void FindResponse::Resource::AddAttachment(const FileInfo& attachment) { if (attachments_.find(attachment.GetContentType()) == attachments_.end()) { @@ -331,7 +331,7 @@ } - bool FindResponse::Item::LookupAttachment(FileInfo& target, FileContentType type) const + bool FindResponse::Resource::LookupAttachment(FileInfo& target, FileContentType type) const { std::map<FileContentType, FileInfo>::const_iterator it = attachments_.find(type); if (it != attachments_.end()) @@ -356,9 +356,9 @@ } - void FindResponse::Add(Item* item /* takes ownership */) + void FindResponse::Add(Resource* item /* takes ownership */) { - std::unique_ptr<Item> protection(item); + std::unique_ptr<Resource> protection(item); if (item == NULL) { @@ -386,7 +386,7 @@ } - const FindResponse::Item& FindResponse::GetItem(size_t index) const + const FindResponse::Resource& FindResponse::GetResource(size_t index) const { if (index >= items_.size()) { @@ -400,7 +400,7 @@ } - FindResponse::Item& FindResponse::GetItem(const std::string& id) + FindResponse::Resource& FindResponse::GetResource(const std::string& id) { Index::const_iterator found = index_.find(id);