2 * Copyright 2001-2006 Internet2
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
20 * Base header file definitions
\r
21 * Must be included prior to including any other header
\r
24 #if !defined(__xmltooling_base_h__)
\r
25 #define __xmltooling_base_h__
\r
27 #if defined (_MSC_VER) || defined(__BORLANDC__)
\r
28 #include <xmltooling/config_pub_win32.h>
\r
30 #include <xmltooling/config_pub.h>
\r
34 * @namespace xmltooling
\r
35 * Public namespace of XML Tooling library
\r
38 // Windows and GCC4 Symbol Visibility Macros
\r
41 #define XMLTOOL_IMPORT __declspec(dllimport)
\r
42 #define XMLTOOL_EXPORT __declspec(dllexport)
\r
43 #define XMLTOOL_DLLLOCAL
\r
44 #define XMLTOOL_DLLPUBLIC
\r
46 #define XMLTOOL_IMPORT
\r
47 #ifdef GCC_HASCLASSVISIBILITY
\r
48 #define XMLTOOL_EXPORT __attribute__ ((visibility("default")))
\r
49 #define XMLTOOL_DLLLOCAL __attribute__ ((visibility("hidden")))
\r
50 #define XMLTOOL_DLLPUBLIC __attribute__ ((visibility("default")))
\r
52 #define XMLTOOL_EXPORT
\r
53 #define XMLTOOL_DLLLOCAL
\r
54 #define XMLTOOL_DLLPUBLIC
\r
58 // Define XMLTOOL_API for DLL builds
\r
59 #ifdef XMLTOOLING_EXPORTS
\r
60 #define XMLTOOL_API XMLTOOL_EXPORT
\r
62 #define XMLTOOL_API XMLTOOL_IMPORT
\r
65 // Throwable classes must always be visible on GCC in all binaries
\r
67 #define XMLTOOL_EXCEPTIONAPI(api) api
\r
68 #elif defined(GCC_HASCLASSVISIBILITY)
\r
69 #define XMLTOOL_EXCEPTIONAPI(api) XMLTOOL_EXPORT
\r
71 #define XMLTOOL_EXCEPTIONAPI(api)
\r
74 #endif /* __xmltooling_base_h__ */
\r