annotate OrthancFramework/Sources/OrthancFramework.h @ 4764:cc02a2aa8bab

integration Orthanc-1.9.6->mainline
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 09 Aug 2021 08:50:04 +0200
parents d9473bd5ed43
children 7053502fbf97
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3988
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
4437
d9473bd5ed43 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4141
diff changeset
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium
3988
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
4119
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
8 * modify it under the terms of the GNU Lesser General Public License
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
10 * the License, or (at your option) any later version.
3988
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4119
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
15 * Lesser General Public License for more details.
3988
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
4119
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
18 * License along with this program. If not, see
bf7b9edf6b81 re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
19 * <http://www.gnu.org/licenses/>.
3988
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 **/
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #pragma once
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
25 /**
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
26 * Besides the "pragma once" above that only protects this file,
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
27 * define a macro to prevent including different versions of
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
28 * "OrthancFramework.h"
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
29 **/
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
30 #ifndef __ORTHANC_FRAMEWORK_H
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
31 #define __ORTHANC_FRAMEWORK_H
3991
5d2348b39392 turning toolbox namespaces into classes to control visibility in shared libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3990
diff changeset
32
4026
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
33 #if !defined(ORTHANC_BUILDING_FRAMEWORK_LIBRARY)
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
34 # error The macro ORTHANC_BUILDING_FRAMEWORK_LIBRARY must be defined
3996
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
35 #endif
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
36
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
37 /**
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
38 * It is implied that if this file is used, we're building the Orthanc
3996
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
39 * framework (not using it as a shared library): We don't use the
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
40 * common "BUILDING_DLL"
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
41 * construction. https://gcc.gnu.org/wiki/Visibility
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
42 **/
4026
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
43 #if ORTHANC_BUILDING_FRAMEWORK_LIBRARY == 1
3996
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
44 # if defined(_WIN32) || defined (__CYGWIN__)
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
45 # define ORTHANC_PUBLIC __declspec(dllexport)
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
46 # define ORTHANC_LOCAL
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
47 # else
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
48 # if __GNUC__ >= 4
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
49 # define ORTHANC_PUBLIC __attribute__((visibility ("default")))
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
50 # define ORTHANC_LOCAL __attribute__((visibility ("hidden")))
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
51 # else
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
52 # define ORTHANC_PUBLIC
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
53 # define ORTHANC_LOCAL
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
54 # pragma warning Unknown dynamic link import/export semantics
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
55 # endif
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
56 # endif
3988
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 #else
3996
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
58 # define ORTHANC_PUBLIC
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
59 # define ORTHANC_LOCAL
3988
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 #endif
3990
226ab94a33cd disabling test for exporting symbols
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3988
diff changeset
61
4026
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
62
4141
99927401587c define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE even if Orthanc framework is statically linked
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
63 #define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(major, minor, revision) \
99927401587c define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE even if Orthanc framework is statically linked
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
64 (ORTHANC_VERSION_MAJOR > major || \
99927401587c define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE even if Orthanc framework is statically linked
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
65 (ORTHANC_VERSION_MAJOR == major && \
99927401587c define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE even if Orthanc framework is statically linked
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
66 (ORTHANC_VERSION_MINOR > minor || \
99927401587c define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE even if Orthanc framework is statically linked
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
67 (ORTHANC_VERSION_MINOR == minor && \
99927401587c define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE even if Orthanc framework is statically linked
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
68 ORTHANC_VERSION_REVISION >= revision))))
99927401587c define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE even if Orthanc framework is statically linked
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
69
99927401587c define ORTHANC_FRAMEWORK_VERSION_IS_ABOVE even if Orthanc framework is statically linked
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4119
diff changeset
70
4026
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
71 #include <string>
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
72
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
73 namespace Orthanc
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
74 {
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
75 ORTHANC_PUBLIC void InitializeFramework(const std::string& locale,
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
76 bool loadPrivateDictionary);
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
77
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
78 ORTHANC_PUBLIC void FinalizeFramework();
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
79 }
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
80
05a363186da6 ORTHANC_BUILDING_FRAMEWORK_LIBRARY, Orthanc::InitializeFramework()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4000
diff changeset
81
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
82 #endif /* __ORTHANC_FRAMEWORK_H */