Mercurial > hg > orthanc
comparison OrthancServer/Search/DicomTagConstraint.h @ 3025:039a9d262d64 db-changes
preparing to speed up find in databases
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 17 Dec 2018 17:05:28 +0100 |
parents | ce310baccda6 |
children | fd587cf51a89 |
comparison
equal
deleted
inserted
replaced
3024:ef17a587e10d | 3025:039a9d262d64 |
---|---|
44 { | 44 { |
45 private: | 45 private: |
46 class NormalizedString; | 46 class NormalizedString; |
47 class RegularExpression; | 47 class RegularExpression; |
48 | 48 |
49 bool hasTagInfo_; | |
50 DicomTagType tagType_; | |
51 ResourceType level_; | |
52 DicomTag tag_; | 49 DicomTag tag_; |
53 ConstraintType constraintType_; | 50 ConstraintType constraintType_; |
54 std::set<std::string> values_; | 51 std::set<std::string> values_; |
55 bool caseSensitive_; | 52 bool caseSensitive_; |
53 bool mandatory_; | |
56 | 54 |
57 boost::shared_ptr<RegularExpression> regex_; | 55 boost::shared_ptr<RegularExpression> regex_; |
58 | 56 |
59 public: | 57 public: |
60 DicomTagConstraint(const DicomTag& tag, | 58 DicomTagConstraint(const DicomTag& tag, |
61 ConstraintType type, | 59 ConstraintType type, |
62 const std::string& value, | 60 const std::string& value, |
63 bool caseSensitive); | 61 bool caseSensitive, |
62 bool mandatory); | |
64 | 63 |
64 // For list search | |
65 DicomTagConstraint(const DicomTag& tag, | 65 DicomTagConstraint(const DicomTag& tag, |
66 ConstraintType type, | 66 ConstraintType type, |
67 bool caseSensitive); | 67 bool caseSensitive, |
68 | 68 bool mandatory); |
69 bool HasTagInfo() const | |
70 { | |
71 return hasTagInfo_; | |
72 } | |
73 | |
74 void SetTagInfo(DicomTagType tagType, | |
75 ResourceType level); | |
76 | |
77 DicomTagType GetTagType() const; | |
78 | |
79 const ResourceType GetLevel() const; | |
80 | 69 |
81 const DicomTag& GetTag() const | 70 const DicomTag& GetTag() const |
82 { | 71 { |
83 return tag_; | 72 return tag_; |
84 } | 73 } |
85 | 74 |
86 ConstraintType GetConstraintType() const | 75 ConstraintType GetType() const |
87 { | 76 { |
88 return constraintType_; | 77 return constraintType_; |
89 } | 78 } |
90 | 79 |
91 bool IsCaseSensitive() const | 80 bool IsCaseSensitive() const |
92 { | 81 { |
93 return caseSensitive_; | 82 return caseSensitive_; |
83 } | |
84 | |
85 bool IsMandatory() const | |
86 { | |
87 return mandatory_; | |
94 } | 88 } |
95 | 89 |
96 void AddValue(const std::string& value); | 90 void AddValue(const std::string& value); |
97 | 91 |
98 const std::string& GetValue() const; | 92 const std::string& GetValue() const; |