diff Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 2269:8e53a2acdf21

convenience macro ORTHANC_PLUGINS_VERSION_IS_ABOVE
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 22 Feb 2017 22:04:41 +0100
parents ce5c13b95dac
children 7ef9207f31d4
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Wed Feb 22 21:49:16 2017 +0100
+++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Wed Feb 22 22:04:41 2017 +0100
@@ -43,9 +43,16 @@
 #include <set>
 
 
-#if (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER >= 2 ||   \
-     (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER == 1 &&  \
-      ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER >= 2))
+
+#define ORTHANC_PLUGINS_VERSION_IS_ABOVE(major, minor, revision) \
+  (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER > major ||               \
+   (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER == major &&             \
+    (ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER > minor ||             \
+     (ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER == minor &&           \
+      ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER >= revision))))
+  
+
+#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 2, 0)
 // The "OrthancPluginFindMatcher()" primitive was introduced in Orthanc 1.2.0
 #  define HAS_ORTHANC_PLUGIN_FIND_MATCHER  1
 #else