Mercurial > hg > orthanc
changeset 5587:0f5586c498d1 find-refactoring
removed FindRequest::FilterConstraint as it was mostly redundant with DicomTagConstraint
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 03 May 2024 17:06:42 +0200 |
parents | fc3914c07dd3 |
children | 1b0fc6685f57 |
files | OrthancServer/Sources/Database/FindRequest.h OrthancServer/Sources/Database/FindResponse.h |
diffstat | 2 files changed, 0 insertions(+), 176 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/FindRequest.h Fri May 03 17:02:02 2024 +0200 +++ b/OrthancServer/Sources/Database/FindRequest.h Fri May 03 17:06:42 2024 +0200 @@ -157,183 +157,12 @@ } }; - // TODO-FIND: this class hierarchy actually adds complexity and is very redundant with DicomTagConstraint. - // e.g, in this class hierarchy, it is difficult to implement an equivalent to DicomTagConstraint::ConvertToDatabaseConstraint - // I have the feeling we can just have a MetadataConstraint in the same way as DicomTagConstraint - // and both convert to a DatabaseConstraint in StatelessDatabaseOperations - // class FilterConstraint : public boost::noncopyable - // { - // Key key_; - - // protected: - // FilterConstraint(const Key& key) : - // key_(key) - // { - // } - - // public: - // virtual ~FilterConstraint() - // { - // } - - // const Key& GetKey() const - // { - // return key_; - // } - - // virtual ConstraintType GetType() const = 0; - // virtual bool IsCaseSensitive() const = 0; // Needed for PN VR - - - // }; - - - // class MandatoryConstraint : public FilterConstraint - // { - // public: - // virtual ConstraintType GetType() const ORTHANC_OVERRIDE - // { - // return ConstraintType_Mandatory; - // } - // }; - - - // class StringConstraint : public FilterConstraint - // { - // private: - // bool caseSensitive_; - - // public: - // StringConstraint(Key key, - // bool caseSensitive) : - // FilterConstraint(key), - // caseSensitive_(caseSensitive) - // { - // } - - // bool IsCaseSensitive() const - // { - // return caseSensitive_; - // } - // }; - - - // class EqualityConstraint : public StringConstraint - // { - // private: - // std::string value_; - - // public: - // explicit EqualityConstraint(Key key, - // bool caseSensitive, - // const std::string& value) : - // StringConstraint(key, caseSensitive), - // value_(value) - // { - // } - - // virtual ConstraintType GetType() const ORTHANC_OVERRIDE - // { - // return ConstraintType_Equality; - // } - - // const std::string& GetValue() const - // { - // return value_; - // } - // }; - - - // class RangeConstraint : public StringConstraint - // { - // private: - // std::string start_; - // std::string end_; // Inclusive - - // public: - // RangeConstraint(Key key, - // bool caseSensitive, - // const std::string& start, - // const std::string& end) : - // StringConstraint(key, caseSensitive), - // start_(start), - // end_(end) - // { - // } - - // virtual ConstraintType GetType() const ORTHANC_OVERRIDE - // { - // return ConstraintType_Range; - // } - - // const std::string& GetStart() const - // { - // return start_; - // } - - // const std::string& GetEnd() const - // { - // return end_; - // } - // }; - - - // class WildcardConstraint : public StringConstraint - // { - // private: - // std::string value_; - - // public: - // explicit WildcardConstraint(Key& key, - // bool caseSensitive, - // const std::string& value) : - // StringConstraint(key, caseSensitive), - // value_(value) - // { - // } - - // virtual ConstraintType GetType() const ORTHANC_OVERRIDE - // { - // return ConstraintType_Wildcard; - // } - - // const std::string& GetValue() const - // { - // return value_; - // } - // }; - - - // class ListConstraint : public StringConstraint - // { - // private: - // std::set<std::string> values_; - - // public: - // ListConstraint(Key key, - // bool caseSensitive) : - // StringConstraint(key, caseSensitive) - // { - // } - - // virtual ConstraintType GetType() const ORTHANC_OVERRIDE - // { - // return ConstraintType_List; - // } - - // const std::set<std::string>& GetValues() const - // { - // return values_; - // } - // }; - private: // filter & ordering fields ResourceType level_; // The level of the response (the filtering on tags, labels and metadata also happens at this level) OrthancIdentifiers orthancIdentifiers_; // The response must belong to this Orthanc resources hierarchy - // std::deque<FilterConstraint*> filterConstraints_; // All tags and metadata filters (note: the order is not important) std::vector<DicomTagConstraint> dicomTagConstraints_; // All tags filters (note: the order is not important) std::deque<void*> /* TODO-FIND */ metadataConstraints_; // All metadata filters (note: the order is not important) bool hasLimits_;
--- a/OrthancServer/Sources/Database/FindResponse.h Fri May 03 17:02:02 2024 +0200 +++ b/OrthancServer/Sources/Database/FindResponse.h Fri May 03 17:06:42 2024 +0200 @@ -109,11 +109,6 @@ { } - ResourceType GetLevel() const - { - return level_; - } - const std::string& GetIdentifier() const { return identifier_;