Mercurial > hg > orthanc
diff OrthancServer/Search/LookupResource.h @ 1750:55d52567bebb db-changes
LookupResource implemented
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 27 Oct 2015 12:45:50 +0100 |
parents | 99f4a05f39fa |
children | fb569ee09a69 |
line wrap: on
line diff
--- a/OrthancServer/Search/LookupResource.h Tue Oct 27 10:54:51 2015 +0100 +++ b/OrthancServer/Search/LookupResource.h Tue Oct 27 12:45:50 2015 +0100 @@ -47,6 +47,7 @@ class Level { private: + ResourceType level_; std::set<DicomTag> identifiers_; std::set<DicomTag> mainTags_; Constraints identifiersConstraints_; @@ -58,6 +59,9 @@ ~Level(); bool Add(std::auto_ptr<IFindConstraint>& constraint); + + void Apply(SetOfResources& candidates, + IDatabaseWrapper& database) const; }; typedef std::map<ResourceType, Level*> Levels; @@ -70,7 +74,13 @@ bool AddInternal(ResourceType level, std::auto_ptr<IFindConstraint>& constraint); - void ApplyUnoptimizedConstraints(SetOfResources& result); + void ApplyLevel(SetOfResources& candidates, + ResourceType level, + IDatabaseWrapper& database) const; + + void ApplyUnoptimizedConstraints(SetOfResources& candidates, + IDatabaseWrapper& database, + IStorageArea& storageArea) const; public: LookupResource(ResourceType level); @@ -88,5 +98,13 @@ { return maxResults_; } + + void Apply(std::list<int64_t>& result, + IDatabaseWrapper& database, + IStorageArea& storageArea) const; + + void Apply(std::list<std::string>& result, + IDatabaseWrapper& database, + IStorageArea& storageArea) const; }; }