EGSnrc C++ class library  Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
egs_libconfig.h
Go to the documentation of this file.
1 /*
2 ###############################################################################
3 #
4 # EGSnrc egs++ symbol export control headers
5 # Copyright (C) 2015 National Research Council Canada
6 #
7 # This file is part of EGSnrc.
8 #
9 # EGSnrc is free software: you can redistribute it and/or modify it under
10 # the terms of the GNU Affero General Public License as published by the
11 # Free Software Foundation, either version 3 of the License, or (at your
12 # option) any later version.
13 #
14 # EGSnrc is distributed in the hope that it will be useful, but WITHOUT ANY
15 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
17 # more details.
18 #
19 # You should have received a copy of the GNU Affero General Public License
20 # along with EGSnrc. If not, see <http://www.gnu.org/licenses/>.
21 #
22 ###############################################################################
23 #
24 # Author: Iwan Kawrakow, 2005
25 #
26 # Contributors:
27 #
28 ###############################################################################
29 */
30 
31 
32 #ifndef EGS_LIBCONFIG_
33 #define EGS_LIBCONFIG_
34 
50 #ifdef MISSING
51  #include "missing.h"
52 #endif
53 
54 #include "egs_config1.h"
55 
56 /*
57  Macro to mark classes and functions as exports/imports
58  on Windows or to assign default or hidden visibility
59 */
60 
61 #ifdef WIN32
62 
63  #ifdef BUILD_APP_LIB
64  #define APP_EXPORT __declspec(dllexport)
65  #else
66  #define APP_EXPORT
67  #endif
68 
69  #ifdef BUILD_DLL
70  #define EGS_EXPORT __declspec(dllexport)
71  #else
72  #define EGS_EXPORT __declspec(dllimport)
73  #endif
74  #define EGS_LOCAL
75  #define APP_LOCAL
76 
77 #else
78 
79  #ifdef HAVE_VISIBILITY
80  #ifdef BUILD_APP_LIB
81  #define APP_EXPORT __attribute__ ((visibility ("default")))
82  #else
83  #define APP_EXPORT
84  #endif
85  #define EGS_EXPORT __attribute__ ((visibility ("default")))
86  #define EGS_LOCAL __attribute__ ((visibility ("hidden")))
87  #define APP_LOCAL __attribute__ ((visibility ("hidden")))
88  #else
89  #define APP_EXPORT
90  #define EGS_EXPORT
91  #define EGS_LOCAL
92  #define APP_LOCAL
93  #endif
94 
95 #endif
96 
97 /*
98  Use the following functions to print info, warnings, or to indicate
99  a fatal error condition.
100 typedef void (*EGS_InfoFunction)(const char *,...);
101 extern EGS_EXPORT EGS_InfoFunction egsInformation;
102 extern EGS_EXPORT EGS_InfoFunction egsWarning;
103 extern EGS_EXPORT EGS_InfoFunction egsFatal;
104 */
105 
106 #endif