Mercurial > hg > orthanc
diff OrthancServer/Sources/Database/FindRequest.h @ 5621:732ec9feeea8 find-refactoring
introduction of FindRequest::ChildrenRetrieveSpecification
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 11 May 2024 15:43:07 +0200 |
parents | 1864b16bc7b1 |
children | 3f13db27b399 |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/FindRequest.h Sat May 11 15:11:22 2024 +0200 +++ b/OrthancServer/Sources/Database/FindRequest.h Sat May 11 15:43:07 2024 +0200 @@ -189,6 +189,41 @@ }; + class ChildrenRetrieveSpecification : public boost::noncopyable + { + private: + bool identifiers_; + bool count_; + + public: + ChildrenRetrieveSpecification() : + identifiers_(false), + count_(false) + { + } + + void SetRetrieveIdentifiers(bool retrieve) + { + identifiers_ = retrieve; + } + + bool IsRetrieveIdentifiers() const + { + return identifiers_; + } + + void SetRetrieveCount(bool retrieve) + { + count_ = retrieve; + } + + bool IsRetrieveCount() const + { + return count_; + } + }; + + private: // filter & ordering fields ResourceType level_; // The level of the response (the filtering on tags, labels and metadata also happens at this level) @@ -210,7 +245,9 @@ ParentRetrieveSpecification retrieveParentPatient_; ParentRetrieveSpecification retrieveParentStudy_; ParentRetrieveSpecification retrieveParentSeries_; - bool retrieveChildrenIdentifiers_; + ChildrenRetrieveSpecification retrieveChildrenStudies_; + ChildrenRetrieveSpecification retrieveChildrenSeries_; + ChildrenRetrieveSpecification retrieveChildrenInstances_; std::set<MetadataType> retrieveChildrenMetadata_; bool retrieveOneInstanceIdentifier_; @@ -346,11 +383,11 @@ return const_cast<FindRequest&>(*this).GetParentRetrieveSpecification(level); } - void SetRetrieveChildrenIdentifiers(bool retrieve); + ChildrenRetrieveSpecification& GetChildrenRetrieveSpecification(ResourceType level); - bool IsRetrieveChildrenIdentifiers() const + const ChildrenRetrieveSpecification& GetChildrenRetrieveSpecification(ResourceType level) const { - return retrieveChildrenIdentifiers_; + return const_cast<FindRequest&>(*this).GetChildrenRetrieveSpecification(level); } void AddRetrieveChildrenMetadata(MetadataType metadata);