JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches
jkqtmath_imexport.h
1#ifndef jkqtmath_IMPORT_H
2#define jkqtmath_IMPORT_H
3
4/*
5 Copyright (c) 2008-2024 Jan W. Krieger (<jan@jkrieger.de>)
6
7 last modification: $LastChangedDate: 2015-04-02 13:55:22 +0200 (Do, 02 Apr 2015) $ (revision $Rev: 3902 $)
8
9 This software is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License (LGPL) as published by
11 the Free Software Foundation, either version 2.1 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License (LGPL) for more details.
18
19 You should have received a copy of the GNU Lesser General Public License (LGPL)
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23
24
25
26/*! \def jkqtmath_LIB_EXPORT
27 \ingroup jkqtmath_libfacilities
28
29 This define allows to export functions and classes from the jkqtmath-library when building a dynamic/shared library.
30 Usage is as follows:
31 \code
32 #include "jkqtmath_imexport/jkqtmath_imexport.h"
33
34 class jkqtmath_LIB_EXPORT exportedClassName {
35 ...
36 };
37
38 jkqtmath_LIB_EXPORT void exportedFunctionName();
39 \endcode
40
41 These macros append the appropriate \c Q_DECL_EXPORT and \c Q_DECL_IMPORT
42 to the function/class body and thus tell windows compilers to export these sysmbols from
43 the shared library, or import them from a shared library.
44
45 Note that these attributes are only necessary on windows systems!
46
47 These macros are controlled by two other macros:
48 - \c jkqtmath_LIB_IN_DLL declares that the application should link against a shared version of
49 JKQTMath, i.e. \c JKQTMathSharedLib_XYZ .
50 This needs to be defined while compiling the library and while compiling
51 any application linking against \c JKQTMathSharedLib_XYZ.
52 - \c jkqtmath_LIB_EXPORT_LIBRARY is only defined while compiling JKQTMath into \c JKQTMathSharedLib_XYZ
53 and ensures thet the symbols are exported. If it is not defined (e.g. while
54 compiling an application), the symbols are imported
55 .
56
57 */
58
59// necessary to add this define to the Doxygen autodoc!!!
60#ifdef DOXYGEN
61# define jkqtmath_LIB_IN_DLL
62#endif
63/*! \def jkqtmath_LIB_IN_DLL
64 \ingroup jkqtmath_libfacilities
65 \brief declares that the application should link against a shared version of
66 JKQTMath, i.e. \c JKQTMathSharedLib_XYZ .
67 This needs to be defined while compiling the library and while compiling
68 any application linking against \c JKQTMathSharedLib_XYZ.
69*/
70
71// necessary to add this define to the Doxygen autodoc!!!
72#ifdef DOXYGEN
73# define jkqtmath_LIB_EXPORT_LIBRARY
74#endif
75/*! \def jkqtmath_LIB_EXPORT_LIBRARY
76 \ingroup jkqtmath_libfacilities
77 \brief is only defined while compiling JKQTMath into \c JKQTMathSharedLib_XYZ
78 and ensures thet the symbols are exported. If it is not defined (e.g. while
79 compiling an application), the symbols are imported
80*/
81
82#include <QtCore/QtGlobal>
83# ifdef jkqtmath_LIB_IN_DLL
84# ifndef jkqtmath_LIB_EXPORT
85# ifdef jkqtmath_LIB_EXPORT_LIBRARY
86 /* We are building this library */
87# define jkqtmath_LIB_EXPORT Q_DECL_EXPORT
88# else
89 /* We are using this library */
90# define jkqtmath_LIB_EXPORT Q_DECL_IMPORT
91# endif
92# endif
93# else
94# ifndef jkqtmath_LIB_EXPORT
95# define jkqtmath_LIB_EXPORT
96# endif
97# endif
98
99
100
101#endif // jkqtmath_IMPORT_H
102