comparison OrthancServer/Search/DatabaseConstraint.h @ 3098:717efd0989f9 db-changes

renamed macro
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 06 Jan 2019 12:43:19 +0100
parents df1b17be20f6
children 94f4a18a79cc
comparison
equal deleted inserted replaced
3097:ac72032d69a2 3098:717efd0989f9
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 #define ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 0 39 #define ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT 0
40 40
41 #if ORTHANC_ENABLE_PLUGINS == 1 41 #if ORTHANC_ENABLE_PLUGINS == 1
42 # include <orthanc/OrthancCDatabasePlugin.h> 42 # include <orthanc/OrthancCDatabasePlugin.h>
43 # if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in 1.3.1 43 # if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in 1.3.1
44 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 2) 44 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 2)
45 # undef ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 45 # undef ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT
46 # define ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 1 46 # define ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT 1
47 # endif 47 # endif
48 # endif 48 # endif
49 #endif 49 #endif
50 50
51 namespace Orthanc 51 namespace Orthanc
58 58
59 #if ORTHANC_ENABLE_PLUGINS == 1 59 #if ORTHANC_ENABLE_PLUGINS == 1
60 ResourceType Convert(OrthancPluginResourceType type); 60 ResourceType Convert(OrthancPluginResourceType type);
61 #endif 61 #endif
62 62
63 #if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 63 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
64 OrthancPluginConstraintType Convert(ConstraintType constraint); 64 OrthancPluginConstraintType Convert(ConstraintType constraint);
65 #endif 65 #endif
66 66
67 #if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 67 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
68 ConstraintType Convert(OrthancPluginConstraintType constraint); 68 ConstraintType Convert(OrthancPluginConstraintType constraint);
69 #endif 69 #endif
70 } 70 }
71 71
72 72
89 ConstraintType type, 89 ConstraintType type,
90 const std::vector<std::string>& values, 90 const std::vector<std::string>& values,
91 bool caseSensitive, 91 bool caseSensitive,
92 bool mandatory); 92 bool mandatory);
93 93
94 #if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 94 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
95 DatabaseConstraint(const OrthancPluginDatabaseConstraint& constraint); 95 DatabaseConstraint(const OrthancPluginDatabaseConstraint& constraint);
96 #endif 96 #endif
97 97
98 ResourceType GetLevel() const 98 ResourceType GetLevel() const
99 { 99 {
134 return mandatory_; 134 return mandatory_;
135 } 135 }
136 136
137 bool IsMatch(const DicomMap& dicom) const; 137 bool IsMatch(const DicomMap& dicom) const;
138 138
139 #if ORTHANC_PLUGINS_HAS_DATABASE_OPTIMIZATIONS_1 == 1 139 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
140 void EncodeForPlugins(OrthancPluginDatabaseConstraint& constraint, 140 void EncodeForPlugins(OrthancPluginDatabaseConstraint& constraint,
141 std::vector<const char*>& tmpValues) const; 141 std::vector<const char*>& tmpValues) const;
142 #endif 142 #endif
143 }; 143 };
144 } 144 }