# HG changeset patch # User Sebastien Jodogne # Date 1481730118 -3600 # Node ID 61e0564d03bb385d9d25bd455fb86fb95e6c26e5 # Parent 40293e60f2245b535fde88f3cdd1acdd3119e5b4 backwards compatibility within OrthancPluginCppWrapper diff -r 40293e60f224 -r 61e0564d03bb Plugins/Samples/Common/OrthancPluginCppWrapper.cpp --- a/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Wed Dec 14 11:05:48 2016 +0100 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Wed Dec 14 16:41:58 2016 +0100 @@ -835,6 +835,8 @@ } + +#if HAS_ORTHANC_PLUGIN_FIND_MATCHER == 1 FindMatcher::FindMatcher(OrthancPluginContext* context, const OrthancPluginWorklistQuery* worklist) : context_(context), @@ -907,6 +909,7 @@ } } +#endif /* HAS_ORTHANC_PLUGIN_FIND_MATCHER == 1 */ bool RestApiGet(Json::Value& result, diff -r 40293e60f224 -r 61e0564d03bb Plugins/Samples/Common/OrthancPluginCppWrapper.h --- 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,