comparison Framework/Plugins/DatabaseConstraint.h @ 549:e620f36b8e09

removed unnecessary macro ORTHANC_ENABLE_PLUGINS
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 09 Sep 2024 13:29:45 +0200
parents 25005693297b
children 9ed9a91bde33 1a23f1ce3b98
comparison
equal deleted inserted replaced
548:25005693297b 549:e620f36b8e09
28 **/ 28 **/
29 29
30 30
31 #pragma once 31 #pragma once
32 32
33 #include <orthanc/OrthancCDatabasePlugin.h>
34
33 #define ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT 0 35 #define ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT 0
34 36
35 #if ORTHANC_ENABLE_PLUGINS == 1 37 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in 1.3.1
36 # include <orthanc/OrthancCDatabasePlugin.h> 38 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 2)
37 # if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in 1.3.1 39 # undef ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT
38 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 2) 40 # define ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT 1
39 # undef ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT
40 # define ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT 1
41 # endif
42 # endif 41 # endif
43 #endif 42 #endif
44 43
45 #include <DicomFormat/DicomMap.h> 44 #include <DicomFormat/DicomMap.h>
46 45
57 ConstraintType_List 56 ConstraintType_List
58 }; 57 };
59 58
60 namespace Plugins 59 namespace Plugins
61 { 60 {
62 #if ORTHANC_ENABLE_PLUGINS == 1
63 OrthancPluginResourceType Convert(ResourceType type); 61 OrthancPluginResourceType Convert(ResourceType type);
64 #endif
65 62
66 #if ORTHANC_ENABLE_PLUGINS == 1
67 ResourceType Convert(OrthancPluginResourceType type); 63 ResourceType Convert(OrthancPluginResourceType type);
68 #endif
69 64
70 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 65 #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
71 OrthancPluginConstraintType Convert(ConstraintType constraint); 66 OrthancPluginConstraintType Convert(ConstraintType constraint);
72 #endif 67 #endif
73 68
75 ConstraintType Convert(OrthancPluginConstraintType constraint); 70 ConstraintType Convert(OrthancPluginConstraintType constraint);
76 #endif 71 #endif
77 } 72 }
78 73
79 74
80 // This class is also used by the "orthanc-databases" project
81 class DatabaseConstraint : public boost::noncopyable 75 class DatabaseConstraint : public boost::noncopyable
82 { 76 {
83 private: 77 private:
84 ResourceType level_; 78 ResourceType level_;
85 DicomTag tag_; 79 DicomTag tag_;