Mercurial > hg > orthanc-databases
comparison Framework/Plugins/IndexBackend.cpp @ 552:987460ae14c9 default
simplification
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 09 Sep 2024 15:21:14 +0200 |
parents | 1a23f1ce3b98 |
children | 7f45f23b10d0 |
comparison
equal
deleted
inserted
replaced
551:1a23f1ce3b98 | 552:987460ae14c9 |
---|---|
2800 | 2800 |
2801 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1 | 2801 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1 |
2802 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 0) | 2802 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 0) |
2803 if (OrthancPluginCheckVersionAdvanced(backend->GetContext(), 1, 12, 0) == 1) | 2803 if (OrthancPluginCheckVersionAdvanced(backend->GetContext(), 1, 12, 0) == 1) |
2804 { | 2804 { |
2805 OrthancDatabases::DatabaseBackendAdapterV4::Register(backend, countConnections, maxDatabaseRetries); | 2805 DatabaseBackendAdapterV4::Register(backend, countConnections, maxDatabaseRetries); |
2806 return; | 2806 return; |
2807 } | 2807 } |
2808 # endif | 2808 # endif |
2809 #endif | 2809 #endif |
2810 | 2810 |
2811 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1 | 2811 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1 |
2812 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2) | 2812 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2) |
2813 if (OrthancPluginCheckVersionAdvanced(backend->GetContext(), 1, 9, 2) == 1) | 2813 if (OrthancPluginCheckVersionAdvanced(backend->GetContext(), 1, 9, 2) == 1) |
2814 { | 2814 { |
2815 OrthancDatabases::DatabaseBackendAdapterV3::Register(backend, countConnections, maxDatabaseRetries); | 2815 DatabaseBackendAdapterV3::Register(backend, countConnections, maxDatabaseRetries); |
2816 return; | 2816 return; |
2817 } | 2817 } |
2818 # endif | 2818 # endif |
2819 #endif | 2819 #endif |
2820 | 2820 |
2821 LOG(WARNING) << "Performance warning: Your version of the Orthanc core or SDK doesn't support multiple readers/writers"; | 2821 LOG(WARNING) << "Performance warning: Your version of the Orthanc core or SDK doesn't support multiple readers/writers"; |
2822 OrthancDatabases::DatabaseBackendAdapterV2::Register(backend); | 2822 DatabaseBackendAdapterV2::Register(backend); |
2823 } | 2823 } |
2824 | 2824 |
2825 | 2825 |
2826 bool IndexBackend::LookupGlobalIntegerProperty(int& target, | 2826 bool IndexBackend::LookupGlobalIntegerProperty(int& target, |
2827 DatabaseManager& manager, | 2827 DatabaseManager& manager, |
2860 } | 2860 } |
2861 | 2861 |
2862 | 2862 |
2863 void IndexBackend::Finalize() | 2863 void IndexBackend::Finalize() |
2864 { | 2864 { |
2865 OrthancDatabases::DatabaseBackendAdapterV2::Finalize(); | 2865 DatabaseBackendAdapterV2::Finalize(); |
2866 | 2866 |
2867 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1 | 2867 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1 |
2868 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2) | 2868 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2) |
2869 OrthancDatabases::DatabaseBackendAdapterV3::Finalize(); | 2869 DatabaseBackendAdapterV3::Finalize(); |
2870 # endif | 2870 # endif |
2871 #endif | 2871 #endif |
2872 | 2872 |
2873 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1 | 2873 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1 |
2874 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 0) | 2874 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 0) |
2875 OrthancDatabases::DatabaseBackendAdapterV4::Finalize(); | 2875 DatabaseBackendAdapterV4::Finalize(); |
2876 # endif | 2876 # endif |
2877 #endif | 2877 #endif |
2878 } | 2878 } |
2879 | 2879 |
2880 | 2880 |