Mercurial > hg > orthanc
diff Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 2231:61e0564d03bb
backwards compatibility within OrthancPluginCppWrapper
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 14 Dec 2016 16:41:58 +0100 |
parents | 028214a95194 |
children | a78d15509a1c |
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.h Wed Dec 14 11:05:48 2016 +0100 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.h Wed Dec 14 16:41:58 2016 +0100 @@ -50,6 +50,17 @@ #endif +#if (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER >= 2 || \ + (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER == 1 && \ + ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER >= 2)) +// The "OrthancPluginFindMatcher()" primitive was introduced in Orthanc 1.2.0 +# define HAS_ORTHANC_PLUGIN_FIND_MATCHER 1 +#else +# define HAS_ORTHANC_PLUGIN_FIND_MATCHER 0 +#endif + + + namespace OrthancPlugins { @@ -334,6 +345,7 @@ }; +#if HAS_ORTHANC_PLUGIN_FIND_MATCHER == 1 class FindMatcher : public boost::noncopyable { private: @@ -372,6 +384,7 @@ return IsMatch(dicom.GetData(), dicom.GetSize()); } }; +#endif bool RestApiGet(Json::Value& result,