annotate Core/OrthancFramework.h @ 3996:c2b9a7a1c74a

ORTHANC_FRAMEWORK_BUILDING_PLUGIN
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 05 Jun 2020 18:26:01 +0200
parents f9863630ec7f
children 44e2a8e0b6ae
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
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium
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
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU General Public License as
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * published by the Free Software Foundation, either version 3 of the
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * License, or (at your option) any later version.
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 * In addition, as a special exception, the copyright holders of this
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * program give permission to link the code of its release with the
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * that use the same license as the "OpenSSL" library), and distribute
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * the linked executables. You must obey the GNU General Public License
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * in all respects for all of the code used other than "OpenSSL". If you
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * modify file(s) with this exception, you may extend this exception to
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * your version of the file(s), but you are not obligated to do so. If
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * you do not wish to do so, delete this exception statement from your
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * version. If you delete this exception statement from all source files
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 * in the program, then also delete it here.
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 *
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * 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
25 * WITHOUT ANY WARRANTY; without even the implied warranty of
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 * General Public License for more details.
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 *
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * You should have received a copy of the GNU General Public License
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 * along with this program. If not, see <http://www.gnu.org/licenses/>.
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 **/
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 #pragma once
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
36 /**
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
37 * 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
38 * 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
39 * "OrthancFramework.h"
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
40 **/
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
41 #ifndef __ORTHANC_FRAMEWORK_H
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
42 #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
43
3996
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
44 #if !defined(ORTHANC_FRAMEWORK_BUILDING_PLUGIN)
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
45 # error Macro ORTHANC_FRAMEWORK_BUILDING_PLUGIN must be defined
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
46 #endif
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
47
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
48 /**
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
49 * 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
50 * 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
51 * common "BUILDING_DLL"
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
52 * 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
53 **/
3996
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
54 #if ORTHANC_FRAMEWORK_BUILDING_PLUGIN == 0
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
55 # if defined(_WIN32) || defined (__CYGWIN__)
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
56 # define ORTHANC_PUBLIC __declspec(dllexport)
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
57 # define ORTHANC_LOCAL
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
58 # else
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
59 # if __GNUC__ >= 4
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
60 # define ORTHANC_PUBLIC __attribute__((visibility ("default")))
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
61 # define ORTHANC_LOCAL __attribute__((visibility ("hidden")))
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
62 # else
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
63 # define ORTHANC_PUBLIC
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
64 # define ORTHANC_LOCAL
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
65 # pragma warning Unknown dynamic link import/export semantics
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
66 # endif
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
67 # endif
3988
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 #else
3996
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
69 # define ORTHANC_PUBLIC
c2b9a7a1c74a ORTHANC_FRAMEWORK_BUILDING_PLUGIN
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3992
diff changeset
70 # define ORTHANC_LOCAL
3988
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 #endif
3990
226ab94a33cd disabling test for exporting symbols
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3988
diff changeset
72
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
73 #endif /* __ORTHANC_FRAMEWORK_H */