| API Docs for SAX and DOM |

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

# XercesDefs.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Copyright 1999-2001,2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *      http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016
    00017 /*
    00018  * $Log$
    00019  * Revision 1.20  2005/04/27 18:21:51  cargilld
    00020  * Fix for problem on Solaris where open may return 0 as a valid FileHandle.  Check for -1 instead.
    00021  *
    00022  * Revision 1.19  2004/09/08 13:56:25  peiyongz
    00023  * Apache License Version 2.0
    00024  *
    00025  * Revision 1.18  2004/02/24 22:57:28  peiyongz
    00026  * XercesDeprecatedDOMLib
    00027  *
    00028  * Revision 1.17  2004/02/17 15:56:50  neilg
    00029  * fix for bug 25035; much thanks to Abe Backus
    00030  *
    00031  * Revision 1.16  2004/02/04 13:26:44  amassari
    00032  * Added support for the Interix platform (Windows Services for Unix 3.5)
    00033  *
    00034  * Revision 1.15  2003/05/29 11:18:37  gareth
    00035  * 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.
    00036  *
    00037  * Revision 1.14  2003/05/12 09:44:19  gareth
    00038  * Port to NetBSD. Patch by Hiramatsu Yoshifumi.
    00039  *
    00040  * Revision 1.13  2003/03/13 22:11:46  tng
    00041  * [Bug 17858] Support for QNX/Neutrino.  Patch from Chris McKillop.
    00042  *
    00043  * Revision 1.12  2003/02/23 05:44:12  jberry
    00044  * Ripple through changes of BeOSDefs.h name change
    00045  *
    00046  * Revision 1.11  2002/12/31 19:31:07  tng
    00047  * [Bug 15590] BeOSDefs.hpp has wrong case in CVS.
    00048  *
    00049  * Revision 1.10  2002/12/02 20:40:49  tng
    00050  * [Bug 12490] Patches required to build Xerces-C++ on BeOS R5.  Patch from Andrew Bachmann.
    00051  *
    00052  * Revision 1.9  2002/11/05 21:44:21  tng
    00053  * Do not code using namespace in a global header.
    00054  *
    00055  * Revision 1.8  2002/11/04 14:40:12  tng
    00056  * C++ Namespace Support.
    00057  *
    00058  * Revision 1.7  2002/07/12 16:48:49  jberry
    00059  * Remove reliance on XML_MACOSX. XML_MACOS is used solely. Where qualification
    00060  * by compiler is required, look for the compiler explicitly such as with
    00061  * XML_METROWERKS or __APPLE__ (for the Apple GCC compiler).
    00062  *
    00063  * Add a few tweaks for compatibility with GCC3.1.
    00064  *
    00065  * This change may address Bug 10649.
    00066  *
    00067  * Revision 1.6  2002/07/10 12:56:45  tng
    00068  * [Bug 9154] Requesting Xerces Version Macro.
    00069  *
    00070  * Revision 1.5  2002/05/21 19:35:08  tng
    00071  * Update from 1.7 to 2.0
    00072  *
    00073  * Revision 1.4  2002/02/27 22:38:34  peiyongz
    00074  * Bug# 6445 Caldera (SCO) OpenServer Port : patch from Martin Kalen
    00075  *
    00076  * Revision 1.3  2002/02/20 21:41:54  tng
    00077  * project files changes for Xerces-C++ 1.7.
    00078  *
    00079  * Revision 1.2  2002/02/17 21:12:06  jberry
    00080  * Adjust "sane includes" include path for Mac OS.
    00081  *
    00082  * I've also changed this path for XML_AS400, XML_TRU64, XML_PTX_CC, and XML_DECCXX
    00083  * 'cause it looks like the right thing to do...hope that's not a mistake.
    00084  *
    00085  * Revision 1.1.1.1  2002/02/01 22:22:13  peiyongz
    00086  * sane_include
    00087  *
    00088  * Revision 1.18  2001/11/29 18:25:18  tng
    00089  * FreeBSD support by Michael Huedepohl.
    00090  *
    00091  * Revision 1.17  2001/11/23 17:19:33  tng
    00092  * Change from 1.5.2 to 1.6.0
    00093  *
    00094  * Revision 1.16  2001/10/15 16:27:35  tng
    00095  * Changes for Xerces-C 1.5.2
    00096  *
    00097  * Revision 1.15  2001/07/13 20:16:38  tng
    00098  * Update for release 1.5.1.
    00099  *
    00100  * Revision 1.14  2001/06/05 13:52:25  tng
    00101  * Change Version number from Xerces 1.4 to 1.5.  By Pei Yong Zhang.
    00102  *
    00103  * Revision 1.13  2001/05/11 13:26:32  tng
    00104  * Copyright update.
    00105  *
    00106  * Revision 1.12  2001/02/08 14:15:33  tng
    00107  * 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.
    00108  *
    00109  * Revision 1.11  2001/01/25 19:17:06  tng
    00110  * const should be used instead of static const.  Fixed by Khaled Noaman.
    00111  *
    00112  * Revision 1.10  2001/01/12 22:09:07  tng
    00113  * Various update for Xerces 1.4
    00114  *
    00115  * Revision 1.9  2000/11/07 18:14:39  andyh
    00116  * Fix incorrect version number in gXercesMinVersion.
    00117  * From Pieter Van-Dyck
    00118  *
    00119  * Revision 1.8  2000/11/02 07:23:27  roddey
    00120  * Just a test of checkin access
    00121  *
    00122  * Revision 1.7  2000/08/18 21:29:14  andyh
    00123  * Change version to 1.3 in preparation for upcoming Xerces 1.3
    00124  * and XML4C 3.3 stable releases
    00125  *
    00126  * Revision 1.6  2000/08/07 20:31:34  jpolast
    00127  * include  module
    00128  *
    00129  * Revision 1.5  2000/08/01 18:26:02  aruna1
    00130  * Tru64 support added
    00131  *
    00132  * Revision 1.4  2000/07/29 05:36:37  jberry
    00133  * Fix misspelling in Mac OS port
    00134  *
    00135  * Revision 1.3  2000/07/19 18:20:12  andyh
    00136  * Macintosh port: fix problems with yesterday's code checkin.  A couple
    00137  * of the changes were mangled or missed.
    00138  *
    00139  * Revision 1.2  2000/04/04 20:11:29  abagchi
    00140  * Added PTX support
    00141  *
    00142  * Revision 1.1  2000/03/02 19:54:50  roddey
    00143  * This checkin includes many changes done while waiting for the
    00144  * 1.1.0 code to be finished. I can't list them all here, but a list is
    00145  * available elsewhere.
    00146  *
    00147  * Revision 1.13  2000/03/02 01:51:00  aruna1
    00148  * Sun CC 5.0 related changes
    00149  *
    00150  * Revision 1.12  2000/02/24 20:05:26  abagchi
    00151  * Swat for removing Log from API docs
    00152  *
    00153  * Revision 1.11  2000/02/22 01:00:10  aruna1
    00154  * GNUGDefs references removed. Now only GCCDefs is used instead
    00155  *
    00156  * Revision 1.10  2000/02/06 07:48:05  rahulj
    00157  * Year 2K copyright swat.
    00158  *
    00159  * Revision 1.9  2000/02/01 23:43:32  abagchi
    00160  * AS/400 related change
    00161  *
    00162  * Revision 1.8  2000/01/21 22:12:29  abagchi
    00163  * OS390 Change: changed OE390 to OS390
    00164  *
    00165  * Revision 1.7  2000/01/14 01:18:35  roddey
    00166  * Added a macro, XMLStrL(), which is defined one way or another according
    00167  * to whether the per-compiler file defines XML_LSTRSUPPORT or not. This
    00168  * allows conditional support of L"" type prefixes.
    00169  *
    00170  * Revision 1.6  2000/01/14 00:52:06  roddey
    00171  * Updated the version information for the next release, i.e. 1.1.0
    00172  *
    00173  * Revision 1.5  1999/12/17 01:28:53  rahulj
    00174  * Merged in changes submitted for UnixWare 7 port. Platform
    00175  * specific files are still missing.
    00176  *
    00177  * Revision 1.4  1999/12/16 23:47:10  rahulj
    00178  * Updated for version 1.0.1
    00179  *
    00180  * Revision 1.3  1999/12/01 17:16:16  rahulj
    00181  * 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
    00182  *
    00183  * Revision 1.2  1999/11/10 02:02:51  abagchi
    00184  * Changed version numbers
    00185  *
    00186  * Revision 1.1.1.1  1999/11/09 01:05:35  twl
    00187  * Initial checkin
    00188  *
    00189  * Revision 1.3  1999/11/08 20:45:19  rahul
    00190  * Swat for adding in Product name and CVS comment log variable.
    00191  *
    00192  */
    00193
    00194
    00195 #if !defined(XERCESDEFS_HPP)
    00196 #define XERCESDEFS_HPP
    00197
    00198 // ---------------------------------------------------------------------------
    00199 //  Include the Xerces version information; this is kept in a separate file to
    00200 //  make modification simple and obvious. Updates to the version header file
    00201 // ---------------------------------------------------------------------------
    00202 #include    <xercesc/util/XercesVersion.hpp>
    00203
    00204
    00205 // ---------------------------------------------------------------------------
    00206 //  Include the header that does automatic sensing of the current platform
    00207 //  and compiler.
    00208 // ---------------------------------------------------------------------------
    00209 #include    <xercesc/util/AutoSense.hpp>
    00210
    00211 #define XERCES_Invalid_File_Handle 0
    00212
    00213 // ---------------------------------------------------------------------------
    00214 //  According to the platform we include a platform specific file. This guy
    00215 //  will set up any platform specific stuff, such as character mode.
    00216 // ---------------------------------------------------------------------------
    00217 #if defined(XML_WIN32)
    00218 #include    <xercesc/util/Platforms/Win32/Win32Defs.hpp>
    00219 #endif
    00220
    00221 #if defined(XML_CYGWIN)
    00222 #include    <xercesc/util/Platforms/Cygwin/CygwinDefs.hpp>
    00223 #endif
    00224
    00225 #if defined(XML_AIX)
    00226 #include    <xercesc/util/Platforms/AIX/AIXDefs.hpp>
    00227 #endif
    00228
    00229 #if defined(XML_SOLARIS)
    00230 #include    <xercesc/util/Platforms/Solaris/SolarisDefs.hpp>
    00231 #endif
    00232
    00233 #if defined(XML_OPENSERVER)
    00234 #include    <xercesc/util/Platforms/OpenServer/OpenServerDefs.hpp>
    00235 #endif
    00236
    00237 #if defined(XML_UNIXWARE)
    00238 #include    <xercesc/util/Platforms/UnixWare/UnixWareDefs.hpp>
    00239 #endif
    00240
    00241 #if defined(XML_HPUX)
    00242 #include    <xercesc/util/Platforms/HPUX/HPUXDefs.hpp>
    00243 #endif
    00244
    00245 #if defined(XML_IRIX)
    00246 #include    <xercesc/util/Platforms/IRIX/IRIXDefs.hpp>
    00247 #endif
    00248
    00249 #if defined(XML_INTERIX)
    00250 #include    <xercesc/util/Platforms/Interix/InterixDefs.hpp>
    00251 #endif
    00252
    00253 #if defined(XML_TANDEM)
    00254 #include    <xercesc/util/Platforms/Tandem/TandemDefs.hpp>
    00255 #endif
    00256
    00257 #if defined(XML_BEOS)
    00258 #include    <xercesc/util/Platforms/BeOS/BeOSDefs.hpp>
    00259 #endif
    00260
    00261 #if defined(XML_LINUX)
    00262 #include    <xercesc/util/Platforms/Linux/LinuxDefs.hpp>
    00263 #endif
    00264
    00265 #if defined(XML_FREEBSD)
    00266 #include    <xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp>
    00267 #endif
    00268
    00269 #if defined(XML_OS390)
    00270 #include    <xercesc/util/Platforms/OS390/OS390Defs.hpp>
    00271 #endif
    00272
    00273 #if defined(XML_PTX)
    00274 #include    <xercesc/util/Platforms/PTX/PTXDefs.hpp>
    00275 #endif
    00276
    00277 #if defined(XML_OS2)
    00278 #include    <xercesc/util/Platforms/OS2/OS2Defs.hpp>
    00279 #endif
    00280
    00281 #if defined(XML_MACOS)
    00282 #include    <xercesc/util/Platforms/MacOS/MacOSDefs.hpp>
    00283 #endif
    00284
    00285 #if defined(XML_AS400)
    00286 #include    <xercesc/util/Platforms/OS400/OS400Defs.hpp>
    00287 #endif
    00288
    00289 #if defined(XML_TRU64)
    00290 #include    <xercesc/util/Platforms/Tru64/Tru64Defs.hpp>
    00291 #endif
    00292
    00293 #if defined(XML_QNX)
    00294 #include    <xercesc/util/Platforms/QNX/QNXDefs.hpp>
    00295 #endif
    00296
    00297 // ---------------------------------------------------------------------------
    00298 //  And now we subinclude a header according to the development environment
    00299 //  we are on. This guy defines for each platform some basic stuff that is
    00300 //  specific to the development environment.
    00301 // ---------------------------------------------------------------------------
    00302 #if defined(XML_VISUALCPP)
    00303 #include    <xercesc/util/Compilers/VCPPDefs.hpp>
    00304 #endif
    00305
    00306 #if defined(XML_CSET)
    00307 #include    <xercesc/util/Compilers/CSetDefs.hpp>
    00308 #endif
    00309
    00310 #if defined(XML_BORLAND)
    00311 #include    <xercesc/util/Compilers/BorlandCDefs.hpp>
    00312 #endif
    00313
    00314 #if defined(XML_SUNCC) || defined(XML_SUNCC5)
    00315 #include    <xercesc/util/Compilers/SunCCDefs.hpp>
    00316 #endif
    00317
    00318 #if defined(XML_SCOCC)
    00319 #include    <xercesc/util/Compilers/SCOCCDefs.hpp>
    00320 #endif
    00321
    00322 #if defined(XML_SOLARIS_KAICC)
    00323 #include    <xercesc/util/Compilers/SunKaiDefs.hpp>
    00324 #endif
    00325
    00326 #if defined(XML_HPUX_CC) || defined(XML_HPUX_aCC) || defined(XML_HPUX_KAICC)
    00327 #include    <xercesc/util/Compilers/HPCCDefs.hpp>
    00328 #endif
    00329
    00330 #if defined(XML_MIPSPRO_CC)
    00331 #include    <xercesc/util/Compilers/MIPSproDefs.hpp>
    00332 #endif
    00333
    00334 #if defined(XML_TANDEMCC)
    00335 #include    <xercesc/util/Compilers/TandemCCDefs.hpp>
    00336 #endif
    00337
    00338 #if defined(XML_GCC)
    00339 #include    <xercesc/util/Compilers/GCCDefs.hpp>
    00340 #endif
    00341
    00342 #if defined(XML_MVSCPP)
    00343 #include    <xercesc/util/Compilers/MVSCPPDefs.hpp>
    00344 #endif
    00345
    00346 #if defined(XML_IBMVAW32)
    00347 #include    <xercesc/util/Compilers/IBMVAW32Defs.hpp>
    00348 #endif
    00349
    00350 #if defined(XML_IBMVAOS2)
    00351 #include    <xercesc/util/Compilers/IBMVAOS2Defs.hpp>
    00352 #endif
    00353
    00354 #if defined(XML_METROWERKS)
    00355 #include    <xercesc/util/Compilers/CodeWarriorDefs.hpp>
    00356 #endif
    00357
    00358 #if defined(XML_PTX_CC)
    00359 #include    <xercesc/util/Compilers/PTXCCDefs.hpp>
    00360 #endif
    00361
    00362 #if defined(XML_AS400)
    00363 #include    <xercesc/util/Compilers/OS400SetDefs.hpp>
    00364 #endif
    00365
    00366 #if defined(XML_DECCXX)
    00367 #include    <xercesc/util/Compilers/DECCXXDefs.hpp>
    00368 #endif
    00369
    00370 #if defined(XML_QCC)
    00371 #include    <xercesc/util/Compilers/QCCDefs.hpp>
    00372 #endif
    00373
    00374 // ---------------------------------------------------------------------------
    00375 //  Some general typedefs that are defined for internal flexibility.
    00376 //
    00377 //  Note  that UTF16Ch is fixed at 16 bits, whereas XMLCh floats in size per
    00378 //  platform, to whatever is the native wide char format there. UCS4Ch is
    00379 //  fixed at 32 bits. The types we defined them in terms of are defined per
    00380 //  compiler, using whatever types are the right ones for them to get these
    00381 //  16/32 bit sizes.
    00382 //
    00383 // ---------------------------------------------------------------------------
    00384 typedef unsigned char       XMLByte;
    00385 typedef XMLUInt16           UTF16Ch;
    00386 typedef XMLUInt32           UCS4Ch;
    00387
    00388
    00389 // ---------------------------------------------------------------------------
    00390 //  Handle boolean. If the platform can handle booleans itself, then we
    00391 //  map our boolean type to the native type. Otherwise we create a default
    00392 //  one as an int and define const values for true and false.
    00393 //
    00394 //  This flag will be set in the per-development environment stuff above.
    00395 // ---------------------------------------------------------------------------
    00396 #if defined(NO_NATIVE_BOOL)
    00397   #ifndef bool
    00398     typedef int     bool;
    00399   #endif
    00400   #ifndef true
    00401     #define  true     1
    00402   #endif
    00403   #ifndef false
    00404     #define false 0
    00405   #endif
    00406 #endif
    00407
    00408 #if defined(XML_NETBSD)
    00409 #include       <xercesc/util/Platforms/NetBSD/NetBSDDefs.hpp>
    00410 #endif
    00411
    00412 // ---------------------------------------------------------------------------
    00413 //  According to whether the compiler suports L"" type strings, we define
    00414 //  the XMLStrL() macro one way or another.
    00415 // ---------------------------------------------------------------------------
    00416 #if defined(XML_LSTRSUPPORT)
    00417 #define XMLStrL(str)  L##str
    00418 #else
    00419 #define XMLStrL(str)  str
    00420 #endif
    00421
    00422
    00423 // ---------------------------------------------------------------------------
    00424 // Define namespace symbols if the compiler supports it.
    00425 // ---------------------------------------------------------------------------
    00426 #if defined(XERCES_HAS_CPP_NAMESPACE)
    00427     #define XERCES_CPP_NAMESPACE_BEGIN namespace XERCES_CPP_NAMESPACE {
    00428     #define XERCES_CPP_NAMESPACE_END  }
    00429     #define XERCES_CPP_NAMESPACE_USE using namespace XERCES_CPP_NAMESPACE;
    00430     #define XERCES_CPP_NAMESPACE_QUALIFIER XERCES_CPP_NAMESPACE::
    00431
    00432     namespace XERCES_CPP_NAMESPACE { }
    00433     namespace xercesc = XERCES_CPP_NAMESPACE;
    00434 #else
    00435     #define XERCES_CPP_NAMESPACE_BEGIN
    00436     #define XERCES_CPP_NAMESPACE_END
    00437     #define XERCES_CPP_NAMESPACE_USE
    00438     #define XERCES_CPP_NAMESPACE_QUALIFIER
    00439 #endif
    00440
    00441 #if defined(XERCES_STD_NAMESPACE)
    00442     #define XERCES_USING_STD(NAME) using std :: NAME;
    00443     #define XERCES_STD_QUALIFIER  std ::
    00444 #else
    00445     #define XERCES_USING_STD(NAME)
    00446     #define XERCES_STD_QUALIFIER
    00447 #endif
    00448
    00449
    00450 // ---------------------------------------------------------------------------
    00451 //  Set up the import/export keyword  for our core projects. The
    00452 //  PLATFORM_XXXX keywords are set in the per-development environment
    00453 //  include above.
    00454 // ---------------------------------------------------------------------------
    00455 #if defined(PROJ_XMLUTIL)
    00456 #define  PLATFORM_EXPORT
    00457 #else
    00458 #define  PLATFORM_IMPORT
    00459 #endif
    00460
    00461 #if defined(PROJ_XMLPARSER)
    00462 #define  PLATFORM_EXPORT
    00463 #else
    00464 #define  PLATFORM_IMPORT
    00465 #endif
    00466
    00467 #if defined(PROJ_SAX4C)
    00468 #define  PLATFORM_EXPORT
    00469 #else
    00470 #define  PLATFORM_IMPORT
    00471 #endif
    00472
    00473 #if defined(PROJ_SAX2)
    00474 #define  PLATFORM_EXPORT
    00475 #else
    00476 #define  PLATFORM_IMPORT
    00477 #endif
    00478
    00479 #if defined(PROJ_DOM)
    00480 #define  PLATFORM_EXPORT
    00481 #else
    00482 #define  PLATFORM_IMPORT
    00483 #endif
    00484
    00485 #if defined(PROJ_DEPRECATED_DOM)
    00486 #define DEPRECATED_DOM_EXPORT PLATFORM_EXPORT
    00487 #else
    00488 #define DEPRECATED_DOM_EXPORT PLATFORM_IMPORT
    00489 #endif
    00490
    00491 #if defined(PROJ_PARSERS)
    00492 #define   PLATFORM_EXPORT
    00493 #else
    00494 #define   PLATFORM_IMPORT
    00495 #endif
    00496
    00497 #if defined(PROJ_VALIDATORS)
    00498 #define VALIDATORS_EXPORT  PLATFORM_EXPORT
    00499 #else
    00500 #define VALIDATORS_EXPORT  PLATFORM_IMPORT
    00501 #endif
    00502
    00503 #endif

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.