annotate Framework/Plugins/PluginInitialization.cpp @ 258:9856290c3cfd

todo
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Apr 2021 17:45:11 +0200
parents 3236894320d6
children 793bbbe11287
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
193
3236894320d6 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 168
diff changeset
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium
24
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #include "PluginInitialization.h"
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
24 #include "../Common/ImplicitTransaction.h"
152
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
25 #include "../../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h"
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
26
152
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
27 #include <Logging.h>
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
28 #include <Toolbox.h>
62
eedd082355f9 fix for compatibility with simplified OrthancPluginCppWrapper
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
29
24
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 namespace OrthancDatabases
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 {
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
33 static bool DisplayPerformanceWarning(const std::string& dbms,
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
34 bool isIndex)
24
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 {
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 (void) DisplayPerformanceWarning; // Disable warning about unused function
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
37 LOG(WARNING) << "Performance warning in " << dbms
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
38 << (isIndex ? " index" : " storage area")
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
39 << ": Non-release build, runtime debug assertions are turned on";
24
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 return true;
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 }
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 bool InitializePlugin(OrthancPluginContext* context,
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
45 const std::string& dbms,
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
46 bool isIndex)
24
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 {
168
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 153
diff changeset
48 #if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 7, 2)
149
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 140
diff changeset
49 Orthanc::Logging::InitializePluginContext(context);
151
6c58af430ba0 improved Orthanc::Logging::Initialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
50 #else
6c58af430ba0 improved Orthanc::Logging::Initialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
51 Orthanc::Logging::Initialize(context);
6c58af430ba0 improved Orthanc::Logging::Initialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
52 #endif
6c58af430ba0 improved Orthanc::Logging::Initialize()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 149
diff changeset
53
62
eedd082355f9 fix for compatibility with simplified OrthancPluginCppWrapper
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 28
diff changeset
54 OrthancPlugins::SetGlobalContext(context);
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
55 ImplicitTransaction::SetErrorOnDoubleExecution(false);
24
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
57 assert(DisplayPerformanceWarning(dbms, isIndex));
24
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 /* Check the version of the Orthanc core */
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 bool useFallback = true;
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
62 bool isOptimal = false;
24
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 4, 0)
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 if (OrthancPluginCheckVersionAdvanced(context, 0, 9, 5) == 0)
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 {
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 LOG(ERROR) << "Your version of Orthanc (" << context->orthancVersion
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 << ") must be above 0.9.5 to run this plugin";
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 return false;
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 }
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72
129
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
73 if (OrthancPluginCheckVersionAdvanced(context, 1, 4, 0) == 1)
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
74 {
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
75 ImplicitTransaction::SetErrorOnDoubleExecution(true);
129
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
76 }
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
77
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
78 if (OrthancPluginCheckVersionAdvanced(context,
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
79 ORTHANC_OPTIMAL_VERSION_MAJOR,
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
80 ORTHANC_OPTIMAL_VERSION_MINOR,
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
81 ORTHANC_OPTIMAL_VERSION_REVISION) == 1)
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
82 {
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
83 isOptimal = true;
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
84 }
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
85
24
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 useFallback = false;
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 # endif
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 #endif
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 if (useFallback &&
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 OrthancPluginCheckVersion(context) == 0)
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 {
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 LOG(ERROR) << "Your version of Orthanc ("
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 << context->orthancVersion << ") must be above "
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 << ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER << "."
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 << ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER << "."
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 << ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 << " to run this plugin";
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 return false;
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 }
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101
64
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
102 if (useFallback)
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
103 {
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
104 std::string v(context->orthancVersion);
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
105
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
106 if (v == "mainline")
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
107 {
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
108 isOptimal = true;
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
109 }
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
110 else
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
111 {
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
112 std::vector<std::string> tokens;
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
113 Orthanc::Toolbox::TokenizeString(tokens, v, '.');
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
114
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
115 if (tokens.size() != 3)
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
116 {
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
117 LOG(ERROR) << "Bad version of Orthanc: " << v;
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
118 return false;
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
119 }
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
120
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
121 int major = boost::lexical_cast<int>(tokens[0]);
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
122 int minor = boost::lexical_cast<int>(tokens[1]);
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
123 int revision = boost::lexical_cast<int>(tokens[2]);
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
124
129
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
125 isOptimal = (major > ORTHANC_OPTIMAL_VERSION_MAJOR ||
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
126 (major == ORTHANC_OPTIMAL_VERSION_MAJOR &&
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
127 minor > ORTHANC_OPTIMAL_VERSION_MINOR) ||
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
128 (major == ORTHANC_OPTIMAL_VERSION_MAJOR &&
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
129 minor == ORTHANC_OPTIMAL_VERSION_MINOR &&
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
130 revision >= ORTHANC_OPTIMAL_VERSION_REVISION));
64
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
131 }
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
132 }
e39c1ebb7a0e fix in backwards compatibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 62
diff changeset
133
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
134 if (!isOptimal &&
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
135 isIndex)
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
136 {
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
137 LOG(WARNING) << "Performance warning in " << dbms
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
138 << " index: Your version of Orthanc ("
129
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
139 << context->orthancVersion << ") should be upgraded to "
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
140 << ORTHANC_OPTIMAL_VERSION_MAJOR << "."
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
141 << ORTHANC_OPTIMAL_VERSION_MINOR << "."
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
142 << ORTHANC_OPTIMAL_VERSION_REVISION
534759b0cf14 use of macros to report performance warnings
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 127
diff changeset
143 << " to benefit from best performance";
28
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
144 }
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
145
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
146
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
147 std::string description = ("Stores the Orthanc " +
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
148 std::string(isIndex ? "index" : "storage area") +
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
149 " into a " + dbms + " database");
c0cb5d2cd696 checks depending on Orthanc version
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 24
diff changeset
150
24
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 OrthancPluginSetDescription(context, description.c_str());
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 return true;
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 }
17f849b2af34 sharing plugin initialization code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 }