comparison OrthancServer/Search/DicomTagConstraint.h @ 3029:ea653ec47f31 db-changes

new class: DatabaseConstraint
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 18 Dec 2018 18:56:55 +0100
parents fd587cf51a89
children 71ac4f28176f
comparison
equal deleted inserted replaced
3027:fd587cf51a89 3029:ea653ec47f31
45 private: 45 private:
46 class NormalizedString; 46 class NormalizedString;
47 class RegularExpression; 47 class RegularExpression;
48 48
49 DicomTag tag_; 49 DicomTag tag_;
50 DicomTagType tagType_;
51 ConstraintType constraintType_; 50 ConstraintType constraintType_;
52 std::set<std::string> values_; 51 std::set<std::string> values_;
53 bool caseSensitive_; 52 bool caseSensitive_;
54 bool mandatory_; 53 bool mandatory_;
55 54
56 boost::shared_ptr<RegularExpression> regex_; 55 boost::shared_ptr<RegularExpression> regex_;
57 56
58 DicomTagConstraint() :
59 tag_(0, 0),
60 tagType_(DicomTagType_Generic)
61 {
62 }
63
64 public: 57 public:
65 DicomTagConstraint(const DicomTag& tag, 58 DicomTagConstraint(const DicomTag& tag,
66 ConstraintType type, 59 ConstraintType type,
67 const std::string& value, 60 const std::string& value,
68 bool caseSensitive, 61 bool caseSensitive,
72 DicomTagConstraint(const DicomTag& tag, 65 DicomTagConstraint(const DicomTag& tag,
73 ConstraintType type, 66 ConstraintType type,
74 bool caseSensitive, 67 bool caseSensitive,
75 bool mandatory); 68 bool mandatory);
76 69
77 DicomTagConstraint* Clone() const;
78
79 const DicomTag& GetTag() const 70 const DicomTag& GetTag() const
80 { 71 {
81 return tag_; 72 return tag_;
82 } 73 }
83 74
84 DicomTagType GetTagType() const
85 {
86 return tagType_;
87 }
88
89 // Set by "ServerIndex::NormalizeLookup()"
90 void SetTagType(DicomTagType type)
91 {
92 tagType_ = type;
93 }
94
95 ConstraintType GetConstraintType() const 75 ConstraintType GetConstraintType() const
96 { 76 {
97 return constraintType_; 77 return constraintType_;
98 } 78 }
99 79