source: NonGTP/Xerces/xerces/include/xercesc/util/XercesDefs.hpp @ 358

Revision 358, 15.3 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1/*
2 * Copyright 1999-2001,2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * $Log: XercesDefs.hpp,v $
19 * Revision 1.19  2004/09/08 13:56:25  peiyongz
20 * Apache License Version 2.0
21 *
22 * Revision 1.18  2004/02/24 22:57:28  peiyongz
23 * XercesDeprecatedDOMLib
24 *
25 * Revision 1.17  2004/02/17 15:56:50  neilg
26 * fix for bug 25035; much thanks to Abe Backus
27 *
28 * Revision 1.16  2004/02/04 13:26:44  amassari
29 * Added support for the Interix platform (Windows Services for Unix 3.5)
30 *
31 * Revision 1.15  2003/05/29 11:18:37  gareth
32 * Added macros in so we can determine whether to do things like iostream as opposed to iostream.h and whether to use std:: or not.
33 *
34 * Revision 1.14  2003/05/12 09:44:19  gareth
35 * Port to NetBSD. Patch by Hiramatsu Yoshifumi.
36 *
37 * Revision 1.13  2003/03/13 22:11:46  tng
38 * [Bug 17858] Support for QNX/Neutrino.  Patch from Chris McKillop.
39 *
40 * Revision 1.12  2003/02/23 05:44:12  jberry
41 * Ripple through changes of BeOSDefs.h name change
42 *
43 * Revision 1.11  2002/12/31 19:31:07  tng
44 * [Bug 15590] BeOSDefs.hpp has wrong case in CVS.
45 *
46 * Revision 1.10  2002/12/02 20:40:49  tng
47 * [Bug 12490] Patches required to build Xerces-C++ on BeOS R5.  Patch from Andrew Bachmann.
48 *
49 * Revision 1.9  2002/11/05 21:44:21  tng
50 * Do not code using namespace in a global header.
51 *
52 * Revision 1.8  2002/11/04 14:40:12  tng
53 * C++ Namespace Support.
54 *
55 * Revision 1.7  2002/07/12 16:48:49  jberry
56 * Remove reliance on XML_MACOSX. XML_MACOS is used solely. Where qualification
57 * by compiler is required, look for the compiler explicitly such as with
58 * XML_METROWERKS or __APPLE__ (for the Apple GCC compiler).
59 *
60 * Add a few tweaks for compatibility with GCC3.1.
61 *
62 * This change may address Bug 10649.
63 *
64 * Revision 1.6  2002/07/10 12:56:45  tng
65 * [Bug 9154] Requesting Xerces Version Macro.
66 *
67 * Revision 1.5  2002/05/21 19:35:08  tng
68 * Update from 1.7 to 2.0
69 *
70 * Revision 1.4  2002/02/27 22:38:34  peiyongz
71 * Bug# 6445 Caldera (SCO) OpenServer Port : patch from Martin Kalen
72 *
73 * Revision 1.3  2002/02/20 21:41:54  tng
74 * project files changes for Xerces-C++ 1.7.
75 *
76 * Revision 1.2  2002/02/17 21:12:06  jberry
77 * Adjust "sane includes" include path for Mac OS.
78 *
79 * I've also changed this path for XML_AS400, XML_TRU64, XML_PTX_CC, and XML_DECCXX
80 * 'cause it looks like the right thing to do...hope that's not a mistake.
81 *
82 * Revision 1.1.1.1  2002/02/01 22:22:13  peiyongz
83 * sane_include
84 *
85 * Revision 1.18  2001/11/29 18:25:18  tng
86 * FreeBSD support by Michael Huedepohl.
87 *
88 * Revision 1.17  2001/11/23 17:19:33  tng
89 * Change from 1.5.2 to 1.6.0
90 *
91 * Revision 1.16  2001/10/15 16:27:35  tng
92 * Changes for Xerces-C 1.5.2
93 *
94 * Revision 1.15  2001/07/13 20:16:38  tng
95 * Update for release 1.5.1.
96 *
97 * Revision 1.14  2001/06/05 13:52:25  tng
98 * Change Version number from Xerces 1.4 to 1.5.  By Pei Yong Zhang.
99 *
100 * Revision 1.13  2001/05/11 13:26:32  tng
101 * Copyright update.
102 *
103 * Revision 1.12  2001/02/08 14:15:33  tng
104 * enable COMPAQ Tru64 UNIX machines to build xerces-c with gcc (tested using COMPAQ gcc version2.95.2 19991024 (release) and Tru64 V5.0 1094).  Added by Martin Kalen.
105 *
106 * Revision 1.11  2001/01/25 19:17:06  tng
107 * const should be used instead of static const.  Fixed by Khaled Noaman.
108 *
109 * Revision 1.10  2001/01/12 22:09:07  tng
110 * Various update for Xerces 1.4
111 *
112 * Revision 1.9  2000/11/07 18:14:39  andyh
113 * Fix incorrect version number in gXercesMinVersion.
114 * From Pieter Van-Dyck
115 *
116 * Revision 1.8  2000/11/02 07:23:27  roddey
117 * Just a test of checkin access
118 *
119 * Revision 1.7  2000/08/18 21:29:14  andyh
120 * Change version to 1.3 in preparation for upcoming Xerces 1.3
121 * and XML4C 3.3 stable releases
122 *
123 * Revision 1.6  2000/08/07 20:31:34  jpolast
124 * include SAX2_EXPORT module
125 *
126 * Revision 1.5  2000/08/01 18:26:02  aruna1
127 * Tru64 support added
128 *
129 * Revision 1.4  2000/07/29 05:36:37  jberry
130 * Fix misspelling in Mac OS port
131 *
132 * Revision 1.3  2000/07/19 18:20:12  andyh
133 * Macintosh port: fix problems with yesterday's code checkin.  A couple
134 * of the changes were mangled or missed.
135 *
136 * Revision 1.2  2000/04/04 20:11:29  abagchi
137 * Added PTX support
138 *
139 * Revision 1.1  2000/03/02 19:54:50  roddey
140 * This checkin includes many changes done while waiting for the
141 * 1.1.0 code to be finished. I can't list them all here, but a list is
142 * available elsewhere.
143 *
144 * Revision 1.13  2000/03/02 01:51:00  aruna1
145 * Sun CC 5.0 related changes
146 *
147 * Revision 1.12  2000/02/24 20:05:26  abagchi
148 * Swat for removing Log from API docs
149 *
150 * Revision 1.11  2000/02/22 01:00:10  aruna1
151 * GNUGDefs references removed. Now only GCCDefs is used instead
152 *
153 * Revision 1.10  2000/02/06 07:48:05  rahulj
154 * Year 2K copyright swat.
155 *
156 * Revision 1.9  2000/02/01 23:43:32  abagchi
157 * AS/400 related change
158 *
159 * Revision 1.8  2000/01/21 22:12:29  abagchi
160 * OS390 Change: changed OE390 to OS390
161 *
162 * Revision 1.7  2000/01/14 01:18:35  roddey
163 * Added a macro, XMLStrL(), which is defined one way or another according
164 * to whether the per-compiler file defines XML_LSTRSUPPORT or not. This
165 * allows conditional support of L"" type prefixes.
166 *
167 * Revision 1.6  2000/01/14 00:52:06  roddey
168 * Updated the version information for the next release, i.e. 1.1.0
169 *
170 * Revision 1.5  1999/12/17 01:28:53  rahulj
171 * Merged in changes submitted for UnixWare 7 port. Platform
172 * specific files are still missing.
173 *
174 * Revision 1.4  1999/12/16 23:47:10  rahulj
175 * Updated for version 1.0.1
176 *
177 * Revision 1.3  1999/12/01 17:16:16  rahulj
178 * Added support for IRIX 6.5.5 using SGI MIPSpro C++ 7.3 and 7.21 generating 32 bit objects. Changes submitted by Marc Stuessel
179 *
180 * Revision 1.2  1999/11/10 02:02:51  abagchi
181 * Changed version numbers
182 *
183 * Revision 1.1.1.1  1999/11/09 01:05:35  twl
184 * Initial checkin
185 *
186 * Revision 1.3  1999/11/08 20:45:19  rahul
187 * Swat for adding in Product name and CVS comment log variable.
188 *
189 */
190
191
192#if !defined(XERCESDEFS_HPP)
193#define XERCESDEFS_HPP
194
195// ---------------------------------------------------------------------------
196//  Include the Xerces version information; this is kept in a separate file to
197//  make modification simple and obvious. Updates to the version header file
198// ---------------------------------------------------------------------------
199#include    <xercesc/util/XercesVersion.hpp>
200
201
202// ---------------------------------------------------------------------------
203//  Include the header that does automatic sensing of the current platform
204//  and compiler.
205// ---------------------------------------------------------------------------
206#include    <xercesc/util/AutoSense.hpp>
207
208
209
210// ---------------------------------------------------------------------------
211//  According to the platform we include a platform specific file. This guy
212//  will set up any platform specific stuff, such as character mode.
213// ---------------------------------------------------------------------------
214#if defined(XML_WIN32)
215#include    <xercesc/util/Platforms/Win32/Win32Defs.hpp>
216#endif
217
218#if defined(XML_CYGWIN)
219#include    <xercesc/util/Platforms/Cygwin/CygwinDefs.hpp>
220#endif
221
222#if defined(XML_AIX)
223#include    <xercesc/util/Platforms/AIX/AIXDefs.hpp>
224#endif
225
226#if defined(XML_SOLARIS)
227#include    <xercesc/util/Platforms/Solaris/SolarisDefs.hpp>
228#endif
229
230#if defined(XML_OPENSERVER)
231#include    <xercesc/util/Platforms/OpenServer/OpenServerDefs.hpp>
232#endif
233
234#if defined(XML_UNIXWARE)
235#include    <xercesc/util/Platforms/UnixWare/UnixWareDefs.hpp>
236#endif
237
238#if defined(XML_HPUX)
239#include    <xercesc/util/Platforms/HPUX/HPUXDefs.hpp>
240#endif
241
242#if defined(XML_IRIX)
243#include    <xercesc/util/Platforms/IRIX/IRIXDefs.hpp>
244#endif
245
246#if defined(XML_INTERIX)
247#include    <xercesc/util/Platforms/Interix/InterixDefs.hpp>
248#endif
249
250#if defined(XML_TANDEM)
251#include    <xercesc/util/Platforms/Tandem/TandemDefs.hpp>
252#endif
253
254#if defined(XML_BEOS)
255#include    <xercesc/util/Platforms/BeOS/BeOSDefs.hpp>
256#endif
257
258#if defined(XML_LINUX)
259#include    <xercesc/util/Platforms/Linux/LinuxDefs.hpp>
260#endif
261
262#if defined(XML_FREEBSD)
263#include    <xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp>
264#endif
265
266#if defined(XML_OS390)
267#include    <xercesc/util/Platforms/OS390/OS390Defs.hpp>
268#endif
269
270#if defined(XML_PTX)
271#include    <xercesc/util/Platforms/PTX/PTXDefs.hpp>
272#endif
273
274#if defined(XML_OS2)
275#include    <xercesc/util/Platforms/OS2/OS2Defs.hpp>
276#endif
277
278#if defined(XML_MACOS)
279#include        <xercesc/util/Platforms/MacOS/MacOSDefs.hpp>
280#endif
281
282#if defined(XML_AS400)
283#include        <xercesc/util/Platforms/OS400/OS400Defs.hpp>
284#endif
285
286#if defined(XML_TRU64)
287#include        <xercesc/util/Platforms/Tru64/Tru64Defs.hpp>
288#endif
289
290#if defined(XML_QNX)
291#include        <xercesc/util/Platforms/QNX/QNXDefs.hpp>
292#endif
293
294// ---------------------------------------------------------------------------
295//  And now we subinclude a header according to the development environment
296//  we are on. This guy defines for each platform some basic stuff that is
297//  specific to the development environment.
298// ---------------------------------------------------------------------------
299#if defined(XML_VISUALCPP)
300#include    <xercesc/util/Compilers/VCPPDefs.hpp>
301#endif
302
303#if defined(XML_CSET)
304#include    <xercesc/util/Compilers/CSetDefs.hpp>
305#endif
306
307#if defined(XML_BORLAND)
308#include    <xercesc/util/Compilers/BorlandCDefs.hpp>
309#endif
310
311#if defined(XML_SUNCC) || defined(XML_SUNCC5)
312#include    <xercesc/util/Compilers/SunCCDefs.hpp>
313#endif
314
315#if defined(XML_SCOCC)
316#include    <xercesc/util/Compilers/SCOCCDefs.hpp>
317#endif
318
319#if defined(XML_SOLARIS_KAICC)
320#include    <xercesc/util/Compilers/SunKaiDefs.hpp>
321#endif
322
323#if defined(XML_HPUX_CC) || defined(XML_HPUX_aCC) || defined(XML_HPUX_KAICC)
324#include    <xercesc/util/Compilers/HPCCDefs.hpp>
325#endif
326
327#if defined(XML_MIPSPRO_CC)
328#include    <xercesc/util/Compilers/MIPSproDefs.hpp>
329#endif
330
331#if defined(XML_TANDEMCC)
332#include    <xercesc/util/Compilers/TandemCCDefs.hpp>
333#endif
334
335#if defined(XML_GCC)
336#include    <xercesc/util/Compilers/GCCDefs.hpp>
337#endif
338
339#if defined(XML_MVSCPP)
340#include    <xercesc/util/Compilers/MVSCPPDefs.hpp>
341#endif
342
343#if defined(XML_IBMVAW32)
344#include    <xercesc/util/Compilers/IBMVAW32Defs.hpp>
345#endif
346
347#if defined(XML_IBMVAOS2)
348#include    <xercesc/util/Compilers/IBMVAOS2Defs.hpp>
349#endif
350
351#if defined(XML_METROWERKS)
352#include        <xercesc/util/Compilers/CodeWarriorDefs.hpp>
353#endif
354
355#if defined(XML_PTX_CC)
356#include        <xercesc/util/Compilers/PTXCCDefs.hpp>
357#endif
358
359#if defined(XML_AS400)
360#include        <xercesc/util/Compilers/OS400SetDefs.hpp>
361#endif
362
363#if defined(XML_DECCXX)
364#include        <xercesc/util/Compilers/DECCXXDefs.hpp>
365#endif
366
367#if defined(XML_QCC)
368#include        <xercesc/util/Compilers/QCCDefs.hpp>
369#endif
370
371// ---------------------------------------------------------------------------
372//  Some general typedefs that are defined for internal flexibility.
373//
374//  Note  that UTF16Ch is fixed at 16 bits, whereas XMLCh floats in size per
375//  platform, to whatever is the native wide char format there. UCS4Ch is
376//  fixed at 32 bits. The types we defined them in terms of are defined per
377//  compiler, using whatever types are the right ones for them to get these
378//  16/32 bit sizes.
379//
380// ---------------------------------------------------------------------------
381typedef unsigned char       XMLByte;
382typedef XMLUInt16           UTF16Ch;
383typedef XMLUInt32           UCS4Ch;
384
385
386// ---------------------------------------------------------------------------
387//  Handle boolean. If the platform can handle booleans itself, then we
388//  map our boolean type to the native type. Otherwise we create a default
389//  one as an int and define const values for true and false.
390//
391//  This flag will be set in the per-development environment stuff above.
392// ---------------------------------------------------------------------------
393#if defined(NO_NATIVE_BOOL)
394  #ifndef bool
395    typedef int     bool;
396  #endif
397  #ifndef true
398    #define  true     1
399  #endif
400  #ifndef false
401    #define false 0
402  #endif
403#endif
404
405#if defined(XML_NETBSD)
406#include       <xercesc/util/Platforms/NetBSD/NetBSDDefs.hpp>
407#endif
408
409// ---------------------------------------------------------------------------
410//  According to whether the compiler suports L"" type strings, we define
411//  the XMLStrL() macro one way or another.
412// ---------------------------------------------------------------------------
413#if defined(XML_LSTRSUPPORT)
414#define XMLStrL(str)  L##str
415#else
416#define XMLStrL(str)  str
417#endif
418
419
420// ---------------------------------------------------------------------------
421// Define namespace symbols if the compiler supports it.
422// ---------------------------------------------------------------------------
423#if defined(XERCES_HAS_CPP_NAMESPACE)
424    #define XERCES_CPP_NAMESPACE_BEGIN namespace XERCES_CPP_NAMESPACE {
425    #define XERCES_CPP_NAMESPACE_END  }
426    #define XERCES_CPP_NAMESPACE_USE using namespace XERCES_CPP_NAMESPACE;
427    #define XERCES_CPP_NAMESPACE_QUALIFIER XERCES_CPP_NAMESPACE::
428
429    namespace XERCES_CPP_NAMESPACE { }
430    namespace xercesc = XERCES_CPP_NAMESPACE;
431#else
432    #define XERCES_CPP_NAMESPACE_BEGIN
433    #define XERCES_CPP_NAMESPACE_END
434    #define XERCES_CPP_NAMESPACE_USE
435    #define XERCES_CPP_NAMESPACE_QUALIFIER
436#endif
437
438#if defined(XERCES_STD_NAMESPACE)
439        #define XERCES_USING_STD(NAME) using std :: NAME;
440        #define XERCES_STD_QUALIFIER  std ::
441#else
442        #define XERCES_USING_STD(NAME)
443        #define XERCES_STD_QUALIFIER
444#endif
445
446
447// ---------------------------------------------------------------------------
448//  Set up the import/export keyword  for our core projects. The
449//  PLATFORM_XXXX keywords are set in the per-development environment
450//  include above.
451// ---------------------------------------------------------------------------
452#if defined(PROJ_XMLUTIL)
453#define XMLUTIL_EXPORT PLATFORM_EXPORT
454#else
455#define XMLUTIL_EXPORT PLATFORM_IMPORT
456#endif
457
458#if defined(PROJ_XMLPARSER)
459#define XMLPARSER_EXPORT PLATFORM_EXPORT
460#else
461#define XMLPARSER_EXPORT PLATFORM_IMPORT
462#endif
463
464#if defined(PROJ_SAX4C)
465#define SAX_EXPORT PLATFORM_EXPORT
466#else
467#define SAX_EXPORT PLATFORM_IMPORT
468#endif
469
470#if defined(PROJ_SAX2)
471#define SAX2_EXPORT PLATFORM_EXPORT
472#else
473#define SAX2_EXPORT PLATFORM_IMPORT
474#endif
475
476#if defined(PROJ_DOM)
477#define CDOM_EXPORT PLATFORM_EXPORT
478#else
479#define CDOM_EXPORT PLATFORM_IMPORT
480#endif
481
482#if defined(PROJ_DEPRECATED_DOM)
483#define DEPRECATED_DOM_EXPORT PLATFORM_EXPORT
484#else
485#define DEPRECATED_DOM_EXPORT PLATFORM_IMPORT
486#endif
487
488#if defined(PROJ_PARSERS)
489#define PARSERS_EXPORT  PLATFORM_EXPORT
490#else
491#define PARSERS_EXPORT  PLATFORM_IMPORT
492#endif
493
494#if defined(PROJ_VALIDATORS)
495#define VALIDATORS_EXPORT  PLATFORM_EXPORT
496#else
497#define VALIDATORS_EXPORT  PLATFORM_IMPORT
498#endif
499
500#endif
Note: See TracBrowser for help on using the repository browser.