annotate Core/OrthancFramework.h @ 3992:f9863630ec7f

working on the shared library for Orthanc framework
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 05 Jun 2020 16:07:01 +0200
parents Core/Exports.h@5d2348b39392
children c2b9a7a1c74a
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
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
44 /**
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
45 * It is implied that if this file is used, we're building the Orthanc
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
46 * framework (not using it): We don't use the common "BUILDING_DLL"
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
47 * 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
48 **/
3988
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 #if defined(_WIN32) || defined (__CYGWIN__)
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
50 # define ORTHANC_PUBLIC __declspec(dllexport)
3988
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 # define ORTHANC_LOCAL
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 #else
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 # if __GNUC__ >= 4
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
54 # define ORTHANC_PUBLIC __attribute__((visibility ("default")))
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
55 # define ORTHANC_LOCAL __attribute__((visibility ("hidden")))
3988
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 # else
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 # define ORTHANC_PUBLIC
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 # define ORTHANC_LOCAL
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 # pragma warning Unknown dynamic link import/export semantics
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 # endif
bdd8f952dd47 playing with visibility
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 #endif
3990
226ab94a33cd disabling test for exporting symbols
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3988
diff changeset
62
3992
f9863630ec7f working on the shared library for Orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3991
diff changeset
63 #endif /* __ORTHANC_FRAMEWORK_H */