XercesDefs.hpp Source File

| API Docs for SAX and DOM |

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XercesDefs.hpp

Go to the documentation of this file.

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

Copyright © 2000 The Apache Software Foundation. All Rights Reserved.