Mercurial > hg > orthanc
changeset 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 | 512e69a0c761 fc260803b5df |
files | Plugins/Include/orthanc/OrthancCPlugin.h Plugins/Samples/Common/OrthancPluginCppWrapper.h |
diffstat | 2 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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