comparison OrthancServer/Search/DatabaseConstraint.h @ 3073:0e9d1731b1b0 db-changes

refactoring to reuse DatabaseConstraint in separate projects
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 02 Jan 2019 13:44:18 +0100
parents 5ebd2ef5e7ae
children 495c5edce708
comparison
equal deleted inserted replaced
3072:1b05fd072c57 3073:0e9d1731b1b0
31 **/ 31 **/
32 32
33 33
34 #pragma once 34 #pragma once
35 35
36 #include "DicomTagConstraint.h" 36 #include "../../Core/DicomFormat/DicomMap.h"
37 #include "../ServerEnumerations.h"
37 38
38 namespace Orthanc 39 namespace Orthanc
39 { 40 {
41 // This class is also used by the "orthanc-databases" project
40 class DatabaseConstraint 42 class DatabaseConstraint
41 { 43 {
42 private: 44 private:
43 ResourceType level_; 45 ResourceType level_;
44 DicomTag tag_; 46 DicomTag tag_;
47 std::vector<std::string> values_; 49 std::vector<std::string> values_;
48 bool caseSensitive_; 50 bool caseSensitive_;
49 bool mandatory_; 51 bool mandatory_;
50 52
51 public: 53 public:
52 DatabaseConstraint(const DicomTagConstraint& constraint, 54 DatabaseConstraint(ResourceType level,
53 ResourceType level, 55 const DicomTag& tag,
54 DicomTagType tagType); 56 bool isIdentifier,
55 57 ConstraintType type,
58 const std::vector<std::string>& values,
59 bool caseSensitive,
60 bool mandatory);
61
56 ResourceType GetLevel() const 62 ResourceType GetLevel() const
57 { 63 {
58 return level_; 64 return level_;
59 } 65 }
60 66