Mercurial > hg > orthanc
diff OrthancServer/Search/LookupResource.h @ 1753:faf2ecab3472 db-changes
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 27 Oct 2015 20:31:34 +0100 |
parents | fb569ee09a69 |
children | 39c37a994b2f |
line wrap: on
line diff
--- a/OrthancServer/Search/LookupResource.h Tue Oct 27 17:45:05 2015 +0100 +++ b/OrthancServer/Search/LookupResource.h Tue Oct 27 20:31:34 2015 +0100 @@ -36,7 +36,6 @@ #include "SetOfResources.h" #include <memory> -#include <boost/thread/mutex.hpp> namespace Orthanc { @@ -70,7 +69,6 @@ ResourceType level_; Levels levels_; Constraints unoptimizedConstraints_; - size_t maxResults_; bool AddInternal(ResourceType level, std::auto_ptr<IFindConstraint>& constraint); @@ -79,41 +77,25 @@ ResourceType level, IDatabaseWrapper& database) const; - bool ApplyUnoptimizedConstraints(std::list<int64_t>& result, - const std::list<int64_t>& candidates, - boost::mutex& databaseMutex, - IDatabaseWrapper& database, - IStorageArea& storageArea) const; - public: LookupResource(ResourceType level); ~LookupResource(); + ResourceType GetLevel() const + { + return level_; + } + void Add(IFindConstraint* constraint); // Takes ownership void Add(const DicomTag& tag, const std::string& dicomQuery, bool caseSensitivePN); - void SetMaxResults(size_t maxResults) - { - maxResults_ = maxResults; - } - - size_t GetMaxResults() const - { - return maxResults_; - } + void FindCandidates(std::list<int64_t>& result, + IDatabaseWrapper& database) const; - bool Apply(std::list<int64_t>& result, - boost::mutex& databaseMutex, - IDatabaseWrapper& database, - IStorageArea& storageArea) const; - - bool Apply(std::list<std::string>& result, - boost::mutex& databaseMutex, - IDatabaseWrapper& database, - IStorageArea& storageArea) const; + bool IsMatch(const Json::Value& dicomAsJson) const; }; }