comparison OrthancServer/Search/DatabaseConstraint.h @ 3074:495c5edce708 db-changes

new extension for database plugin SDK: lookupResources
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 02 Jan 2019 15:50:44 +0100
parents 0e9d1731b1b0
children aae1d6d31fef
comparison
equal deleted inserted replaced
3073:0e9d1731b1b0 3074:495c5edce708
34 #pragma once 34 #pragma once
35 35
36 #include "../../Core/DicomFormat/DicomMap.h" 36 #include "../../Core/DicomFormat/DicomMap.h"
37 #include "../ServerEnumerations.h" 37 #include "../ServerEnumerations.h"
38 38
39 #if ORTHANC_ENABLE_PLUGINS == 1
40 # include "../../Plugins/Include/orthanc/OrthancCDatabasePlugin.h"
41 #endif
42
39 namespace Orthanc 43 namespace Orthanc
40 { 44 {
41 // This class is also used by the "orthanc-databases" project 45 // This class is also used by the "orthanc-databases" project
42 class DatabaseConstraint 46 class DatabaseConstraint
43 { 47 {
56 bool isIdentifier, 60 bool isIdentifier,
57 ConstraintType type, 61 ConstraintType type,
58 const std::vector<std::string>& values, 62 const std::vector<std::string>& values,
59 bool caseSensitive, 63 bool caseSensitive,
60 bool mandatory); 64 bool mandatory);
65
66 #if ORTHANC_ENABLE_PLUGINS == 1
67 DatabaseConstraint(const OrthancPluginDatabaseConstraint& constraint);
68 #endif
61 69
62 ResourceType GetLevel() const 70 ResourceType GetLevel() const
63 { 71 {
64 return level_; 72 return level_;
65 } 73 }
97 { 105 {
98 return mandatory_; 106 return mandatory_;
99 } 107 }
100 108
101 bool IsMatch(const DicomMap& dicom) const; 109 bool IsMatch(const DicomMap& dicom) const;
110
111 #if ORTHANC_ENABLE_PLUGINS == 1
112 void EncodeForPlugins(OrthancPluginDatabaseConstraint& constraint,
113 std::vector<const char*>& tmpValues) const;
114 #endif
102 }; 115 };
103 } 116 }