# HG changeset patch # User Sebastien Jodogne # Date 1487797481 -3600 # Node ID 8e53a2acdf21bfc8672e50346611795cac663efd # Parent ce5c13b95dac460a2b8e323a4e680ab3037ebffc convenience macro ORTHANC_PLUGINS_VERSION_IS_ABOVE diff -r ce5c13b95dac -r 8e53a2acdf21 Plugins/Include/orthanc/OrthancCPlugin.h --- a/Plugins/Include/orthanc/OrthancCPlugin.h Wed Feb 22 21:49:16 2017 +0100 +++ b/Plugins/Include/orthanc/OrthancCPlugin.h Wed Feb 22 22:04:41 2017 +0100 @@ -118,7 +118,7 @@ #define ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER 1 #define ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER 2 -#define ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER 0 +#define ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER 1 diff -r ce5c13b95dac -r 8e53a2acdf21 Plugins/Samples/Common/OrthancPluginCppWrapper.h --- 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 -#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