http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

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


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