XercesDefs.hpp

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  * 
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  * 
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 /*
00019  * $Id: XercesDefs.hpp 568078 2007-08-21 11:43:25Z amassari $
00020  */
00021 
00022 
00023 #if !defined(XERCESDEFS_HPP)
00024 #define XERCESDEFS_HPP
00025 
00026 // ---------------------------------------------------------------------------
00027 //  Include the Xerces version information; this is kept in a separate file to
00028 //  make modification simple and obvious. Updates to the version header file
00029 // ---------------------------------------------------------------------------
00030 #include    <xercesc/util/XercesVersion.hpp>
00031 
00032 
00033 // ---------------------------------------------------------------------------
00034 //  Include the header that does automatic sensing of the current platform
00035 //  and compiler.
00036 // ---------------------------------------------------------------------------
00037 #include    <xercesc/util/AutoSense.hpp>
00038 
00039 #define XERCES_Invalid_File_Handle 0
00040 
00041 // ---------------------------------------------------------------------------
00042 //  According to the platform we include a platform specific file. This guy
00043 //  will set up any platform specific stuff, such as character mode.
00044 // ---------------------------------------------------------------------------
00045 #if defined(XML_WIN32)
00046 #include    <xercesc/util/Platforms/Win32/Win32Defs.hpp>
00047 #endif
00048 
00049 #if defined(XML_CYGWIN)
00050 #include    <xercesc/util/Platforms/Cygwin/CygwinDefs.hpp>
00051 #endif
00052 
00053 #if defined(XML_AIX)
00054 #include    <xercesc/util/Platforms/AIX/AIXDefs.hpp>
00055 #endif
00056 
00057 #if defined(XML_SOLARIS)
00058 #include    <xercesc/util/Platforms/Solaris/SolarisDefs.hpp>
00059 #endif
00060 
00061 #if defined(XML_OPENSERVER)
00062 #include    <xercesc/util/Platforms/OpenServer/OpenServerDefs.hpp>
00063 #endif
00064 
00065 #if defined(XML_UNIXWARE)
00066 #include    <xercesc/util/Platforms/UnixWare/UnixWareDefs.hpp>
00067 #endif
00068 
00069 #if defined(XML_HPUX)
00070 #include    <xercesc/util/Platforms/HPUX/HPUXDefs.hpp>
00071 #endif
00072 
00073 #if defined(XML_IRIX)
00074 #include    <xercesc/util/Platforms/IRIX/IRIXDefs.hpp>
00075 #endif
00076 
00077 #if defined(XML_INTERIX)
00078 #include    <xercesc/util/Platforms/Interix/InterixDefs.hpp>
00079 #endif
00080 
00081 #if defined(XML_TANDEM)
00082 #include    <xercesc/util/Platforms/Tandem/TandemDefs.hpp>
00083 #endif
00084 
00085 #if defined(XML_BEOS)
00086 #include    <xercesc/util/Platforms/BeOS/BeOSDefs.hpp>
00087 #endif
00088 
00089 #if defined(XML_LINUX)
00090 #include    <xercesc/util/Platforms/Linux/LinuxDefs.hpp>
00091 #endif
00092 
00093 #if defined(XML_FREEBSD)
00094 #include    <xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp>
00095 #endif
00096 
00097 #if defined(XML_OS390)
00098 #include    <xercesc/util/Platforms/OS390/OS390Defs.hpp>
00099 #endif
00100 
00101 #if defined(XML_PTX)
00102 #include    <xercesc/util/Platforms/PTX/PTXDefs.hpp>
00103 #endif
00104 
00105 #if defined(XML_OS2)
00106 #include    <xercesc/util/Platforms/OS2/OS2Defs.hpp>
00107 #endif
00108 
00109 #if defined(XML_MACOS)
00110 #include    <xercesc/util/Platforms/MacOS/MacOSDefs.hpp>
00111 #endif
00112 
00113 #if defined(XML_AS400)
00114 #include    <xercesc/util/Platforms/OS400/OS400Defs.hpp>
00115 #endif
00116 
00117 #if defined(XML_TRU64)
00118 #include    <xercesc/util/Platforms/Tru64/Tru64Defs.hpp>
00119 #endif
00120 
00121 #if defined(XML_QNX)
00122 #include    <xercesc/util/Platforms/QNX/QNXDefs.hpp>
00123 #endif
00124 
00125 // ---------------------------------------------------------------------------
00126 //  And now we subinclude a header according to the development environment
00127 //  we are on. This guy defines for each platform some basic stuff that is
00128 //  specific to the development environment.
00129 // ---------------------------------------------------------------------------
00130 #if defined(XML_VISUALCPP)
00131 #include    <xercesc/util/Compilers/VCPPDefs.hpp>
00132 #endif
00133 
00134 #if defined(XML_CSET)
00135 #include    <xercesc/util/Compilers/CSetDefs.hpp>
00136 #endif
00137 
00138 #if defined(XML_BORLAND)
00139 #include    <xercesc/util/Compilers/BorlandCDefs.hpp>
00140 #endif
00141 
00142 #if defined(XML_SUNCC) || defined(XML_SUNCC5)
00143 #include    <xercesc/util/Compilers/SunCCDefs.hpp>
00144 #endif
00145 
00146 #if defined(XML_SCOCC)
00147 #include    <xercesc/util/Compilers/SCOCCDefs.hpp>
00148 #endif
00149 
00150 #if defined(XML_SOLARIS_KAICC)
00151 #include    <xercesc/util/Compilers/SunKaiDefs.hpp>
00152 #endif
00153 
00154 #if defined(XML_HPUX_CC) || defined(XML_HPUX_aCC) || defined(XML_HPUX_KAICC)
00155 #include    <xercesc/util/Compilers/HPCCDefs.hpp>
00156 #endif
00157 
00158 #if defined(XML_MIPSPRO_CC)
00159 #include    <xercesc/util/Compilers/MIPSproDefs.hpp>
00160 #endif
00161 
00162 #if defined(XML_TANDEMCC)
00163 #include    <xercesc/util/Compilers/TandemCCDefs.hpp>
00164 #endif
00165 
00166 #if defined(XML_GCC)
00167 #include    <xercesc/util/Compilers/GCCDefs.hpp>
00168 #endif
00169 
00170 #if defined(XML_MVSCPP)
00171 #include    <xercesc/util/Compilers/MVSCPPDefs.hpp>
00172 #endif
00173 
00174 #if defined(XML_IBMVAW32)
00175 #include    <xercesc/util/Compilers/IBMVAW32Defs.hpp>
00176 #endif
00177 
00178 #if defined(XML_IBMVAOS2)
00179 #include    <xercesc/util/Compilers/IBMVAOS2Defs.hpp>
00180 #endif
00181 
00182 #if defined(XML_METROWERKS)
00183 #include    <xercesc/util/Compilers/CodeWarriorDefs.hpp>
00184 #endif
00185 
00186 #if defined(XML_PTX_CC)
00187 #include    <xercesc/util/Compilers/PTXCCDefs.hpp>
00188 #endif
00189 
00190 #if defined(XML_AS400)
00191 #include    <xercesc/util/Compilers/OS400SetDefs.hpp>
00192 #endif
00193 
00194 #if defined(XML_DECCXX)
00195 #include    <xercesc/util/Compilers/DECCXXDefs.hpp>
00196 #endif
00197 
00198 #if defined(XML_QCC)
00199 #include    <xercesc/util/Compilers/QCCDefs.hpp>
00200 #endif
00201 
00202 // ---------------------------------------------------------------------------
00203 //  Some general typedefs that are defined for internal flexibility.
00204 //
00205 //  Note  that UTF16Ch is fixed at 16 bits, whereas XMLCh floats in size per
00206 //  platform, to whatever is the native wide char format there. UCS4Ch is
00207 //  fixed at 32 bits. The types we defined them in terms of are defined per
00208 //  compiler, using whatever types are the right ones for them to get these
00209 //  16/32 bit sizes.
00210 //
00211 // ---------------------------------------------------------------------------
00212 typedef unsigned char       XMLByte;
00213 typedef XMLUInt16           UTF16Ch;
00214 typedef XMLUInt32           UCS4Ch;
00215 
00216 
00217 // ---------------------------------------------------------------------------
00218 //  Handle boolean. If the platform can handle booleans itself, then we
00219 //  map our boolean type to the native type. Otherwise we create a default
00220 //  one as an int and define const values for true and false.
00221 //
00222 //  This flag will be set in the per-development environment stuff above.
00223 // ---------------------------------------------------------------------------
00224 #if defined(NO_NATIVE_BOOL)
00225   #ifndef bool
00226     typedef int     bool;
00227   #endif
00228   #ifndef true
00229     #define  true     1
00230   #endif
00231   #ifndef false
00232     #define false 0
00233   #endif
00234 #endif
00235 
00236 #if defined(XML_NETBSD)
00237 #include       <xercesc/util/Platforms/NetBSD/NetBSDDefs.hpp>
00238 #endif
00239 
00240 // ---------------------------------------------------------------------------
00241 //  According to whether the compiler suports L"" type strings, we define
00242 //  the XMLStrL() macro one way or another.
00243 // ---------------------------------------------------------------------------
00244 #if defined(XML_LSTRSUPPORT)
00245 #define XMLStrL(str)  L##str
00246 #else
00247 #define XMLStrL(str)  str
00248 #endif
00249 
00250 
00251 // ---------------------------------------------------------------------------
00252 // Define namespace symbols if the compiler supports it.
00253 // ---------------------------------------------------------------------------
00254 #if defined(XERCES_HAS_CPP_NAMESPACE)
00255     #define XERCES_CPP_NAMESPACE_BEGIN namespace XERCES_CPP_NAMESPACE {
00256     #define XERCES_CPP_NAMESPACE_END  }
00257     #define XERCES_CPP_NAMESPACE_USE using namespace XERCES_CPP_NAMESPACE;
00258     #define XERCES_CPP_NAMESPACE_QUALIFIER XERCES_CPP_NAMESPACE::
00259 
00260     namespace XERCES_CPP_NAMESPACE { }
00261     namespace xercesc = XERCES_CPP_NAMESPACE;
00262 #else
00263     #define XERCES_CPP_NAMESPACE_BEGIN
00264     #define XERCES_CPP_NAMESPACE_END
00265     #define XERCES_CPP_NAMESPACE_USE
00266     #define XERCES_CPP_NAMESPACE_QUALIFIER
00267 #endif
00268 
00269 #if defined(XERCES_STD_NAMESPACE)
00270     #define XERCES_USING_STD(NAME) using std :: NAME;
00271     #define XERCES_STD_QUALIFIER  std ::
00272 #else
00273     #define XERCES_USING_STD(NAME)
00274     #define XERCES_STD_QUALIFIER 
00275 #endif
00276 
00277 
00278 // ---------------------------------------------------------------------------
00279 //  Set up the import/export keyword  for our core projects. The
00280 //  PLATFORM_XXXX keywords are set in the per-development environment
00281 //  include above.
00282 // ---------------------------------------------------------------------------
00283 #if defined(PROJ_XMLUTIL)
00284 #define XMLUTIL_EXPORT PLATFORM_EXPORT
00285 #else
00286 #define XMLUTIL_EXPORT PLATFORM_IMPORT
00287 #endif
00288 
00289 #if defined(PROJ_XMLPARSER)
00290 #define XMLPARSER_EXPORT PLATFORM_EXPORT
00291 #else
00292 #define XMLPARSER_EXPORT PLATFORM_IMPORT
00293 #endif
00294 
00295 #if defined(PROJ_SAX4C)
00296 #define SAX_EXPORT PLATFORM_EXPORT
00297 #else
00298 #define SAX_EXPORT PLATFORM_IMPORT
00299 #endif
00300 
00301 #if defined(PROJ_SAX2)
00302 #define SAX2_EXPORT PLATFORM_EXPORT
00303 #else
00304 #define SAX2_EXPORT PLATFORM_IMPORT
00305 #endif
00306 
00307 #if defined(PROJ_DOM)
00308 #define CDOM_EXPORT PLATFORM_EXPORT
00309 #else
00310 #define CDOM_EXPORT PLATFORM_IMPORT
00311 #endif
00312 
00313 #if defined(PROJ_DEPRECATED_DOM)
00314 #define DEPRECATED_DOM_EXPORT PLATFORM_EXPORT
00315 #else
00316 #define DEPRECATED_DOM_EXPORT PLATFORM_IMPORT
00317 #endif
00318 
00319 #if defined(PROJ_PARSERS)
00320 #define PARSERS_EXPORT  PLATFORM_EXPORT
00321 #else
00322 #define PARSERS_EXPORT  PLATFORM_IMPORT
00323 #endif
00324 
00325 #if defined(PROJ_VALIDATORS)
00326 #define VALIDATORS_EXPORT  PLATFORM_EXPORT
00327 #else
00328 #define VALIDATORS_EXPORT  PLATFORM_IMPORT
00329 #endif
00330 
00331 #endif

Generated on Thu Feb 19 11:35:43 2009 for Xerces-C++ by  doxygen 1.5.4