1 /**
2  * @file    XMLExtern.h
3  * @brief   Defines LIBLAX_EXTERN
4  * @author  Ben Bornstein
5  *
6  * <!--------------------------------------------------------------------------
7  * This file is part of libSBML.  Please visit http://sbml.org for more
8  * information about SBML, and the latest version of libSBML.
9  *
10  * Copyright (C) 2020 jointly by the following organizations:
11  *     1. California Institute of Technology, Pasadena, CA, USA
12  *     2. University of Heidelberg, Heidelberg, Germany
13  *     3. University College London, London, UK
14  *
15  * Copyright (C) 2019 jointly by the following organizations:
16  *     1. California Institute of Technology, Pasadena, CA, USA
17  *     2. University of Heidelberg, Heidelberg, Germany
18  *
19  * Copyright (C) 2013-2018 jointly by the following organizations:
20  *     1. California Institute of Technology, Pasadena, CA, USA
21  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
22  *     3. University of Heidelberg, Heidelberg, Germany
23  *
24  * Copyright (C) 2009-2013 jointly by the following organizations:
25  *     1. California Institute of Technology, Pasadena, CA, USA
26  *     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
27  *
28  * Copyright (C) 2006-2008 by the California Institute of Technology,
29  *     Pasadena, CA, USA
30  *
31  * Copyright (C) 2002-2005 jointly by the following organizations:
32  *     1. California Institute of Technology, Pasadena, CA, USA
33  *     2. Japan Science and Technology Agency, Japan
34  *
35  * This library is free software; you can redistribute it and/or modify it
36  * under the terms of the GNU Lesser General Public License as published by
37  * the Free Software Foundation.  A copy of the license agreement is provided
38  * in the file named "LICENSE.txt" included with this software distribution and
39  * also available online as http://sbml.org/software/libsbml/license.html
40  * ---------------------------------------------------------------------- -->*/
41 
42 #ifndef XMLExtern_h
43 #define XMLExtern_h
44 
45 #include <sbml/common/libsbml-namespace.h>
46 
47 /*
48  * The following ifdef block is the standard way of creating macros which
49  * make exporting from a DLL simpler. All files within this DLL are
50  * compiled with the LIBLAX_EXPORTS symbol defined on the command line.
51  * This symbol should not be defined on any project that uses this
52  * DLL. This way any other project whose source files include this file see
53  * LIBLAX_EXTERN functions as being imported from a DLL, wheras this DLL
54  * sees symbols defined with this macro as being exported.
55  */
56 # if (defined(WIN32) && ! defined(CYGWIN) && ! defined(LIBLAX_STATIC) && !defined(__MINGW32__))
57 #   if defined(LIBLAX_EXPORTS)
58 #     define LIBLAX_EXTERN __declspec(dllexport)
59 #   else
60 #     define LIBLAX_EXTERN __declspec(dllimport)
61 #   endif
62 # else
63 #   define LIBLAX_EXTERN
64 # endif
65 
66 #undef BEGIN_C_DECLS
67 #undef END_C_DECLS
68 #if defined(__cplusplus)
69 #  define BEGIN_C_DECLS extern "C" {
70 #  define END_C_DECLS   }
71 #else
72 #  define BEGIN_C_DECLS
73 #  define END_C_DECLS
74 #endif
75 
76 
77 /*
78  * Disable MSVC++ warning C4251: class 'type' needs to have dll-interface
79  * to be used by clients of class 'type2'.
80  *
81  * For an explanation of why this is safe, see:
82  *   - http://www.unknownroad.com/rtfm/VisualStudio/warningC4251.html
83  */
84 #if (defined(WIN32) && ! defined (CYGWIN) && !defined(__MINGW32__))
85 #pragma warning(disable: 4251)
86 #endif
87 
88 
89 #endif  /* XMLExtern_h */
90 
91