XercesVersion.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 #if !defined(XERCESVERSION_HPP)
00019 #define XERCESVERSION_HPP
00020 
00021 // ---------------------------------------------------------------------------
00022 // X E R C E S   V E R S I O N   H E A D E R   D O C U M E N T A T I O N
00023 
00117 // ---------------------------------------------------------------------------
00118 // X E R C E S   V E R S I O N   S P E C I F I C A T I O N
00119 
00125 #define XERCES_VERSION_MAJOR 2
00126 #define XERCES_VERSION_MINOR 8
00127 #define XERCES_VERSION_REVISION 0
00128 
00129 /***
00130  * data member added to XSAnnotation
00131  ***/
00132 #define XERCES_GRAMMAR_SERIALIZATION_LEVEL 5
00133 
00143 // ---------------------------------------------------------------------------
00144 // T W O   A R G U M E N T   C O N C A T E N A T I O N   M A C R O S
00145 
00146 // two argument concatenation routines
00147 #define CAT2_SEP_UNDERSCORE(a, b) #a "_" #b
00148 #define CAT2_SEP_PERIOD(a, b) #a "." #b
00149 #define CAT2_SEP_NIL(a, b) #a #b
00150 #define CAT2_RAW_NUMERIC(a, b) a ## b
00151 
00152 // two argument macro invokers
00153 #define INVK_CAT2_SEP_UNDERSCORE(a,b) CAT2_SEP_UNDERSCORE(a,b)
00154 #define INVK_CAT2_SEP_PERIOD(a,b)     CAT2_SEP_PERIOD(a,b)
00155 #define INVK_CAT2_STR_SEP_NIL(a,b)    CAT2_SEP_NIL(a,b)
00156 #define INVK_CAT2_RAW_NUMERIC(a,b)    CAT2_RAW_NUMERIC(a,b)
00157 
00158 // ---------------------------------------------------------------------------
00159 // T H R E E   A R G U M E N T   C O N C A T E N A T I O N   M A C R O S
00160 
00161 // three argument concatenation routines
00162 #define CAT3_SEP_UNDERSCORE(a, b, c) #a "_" #b "_" #c
00163 #define CAT3_SEP_PERIOD(a, b, c) #a "." #b "." #c
00164 #define CAT3_SEP_NIL(a, b, c) #a #b #c
00165 #define CAT3_RAW_NUMERIC(a, b, c) a ## b ## c
00166 #define CAT3_RAW_NUMERIC_SEP_UNDERSCORE(a, b, c) a ## _ ## b ## _ ## c
00167 
00168 // three argument macro invokers
00169 #define INVK_CAT3_SEP_UNDERSCORE(a,b,c) CAT3_SEP_UNDERSCORE(a,b,c)
00170 #define INVK_CAT3_SEP_PERIOD(a,b,c)     CAT3_SEP_PERIOD(a,b,c)
00171 #define INVK_CAT3_SEP_NIL(a,b,c)        CAT3_SEP_NIL(a,b,c)
00172 #define INVK_CAT3_RAW_NUMERIC(a,b,c)    CAT3_RAW_NUMERIC(a,b,c)
00173 #define INVK_CAT3_RAW_NUMERIC_SEP_UNDERSCORE(a,b,c)    CAT3_RAW_NUMERIC_SEP_UNDERSCORE(a,b,c)
00174 
00175 // ---------------------------------------------------------------------------
00176 // C A L C U L A T E   V E R S I O N   -   E X P A N D E D   F O R M
00177 
00178 #define MULTIPLY(factor,value) factor * value
00179 #define CALC_EXPANDED_FORM(a,b,c) ( MULTIPLY(10000,a) + MULTIPLY(100,b) + MULTIPLY(1,c) )
00180 
00181 // ---------------------------------------------------------------------------
00182 // X E R C E S   V E R S I O N   I N F O R M A T I O N
00183 
00184 // Xerces version strings; these particular macros cannot be used for
00185 // conditional compilation as they are not numeric constants
00186 
00187 #define XERCES_FULLVERSIONSTR INVK_CAT3_SEP_UNDERSCORE(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR,XERCES_VERSION_REVISION)
00188 #define XERCES_FULLVERSIONDOT INVK_CAT3_SEP_PERIOD(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR,XERCES_VERSION_REVISION)
00189 #define XERCES_FULLVERSIONNUM INVK_CAT3_SEP_NIL(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR,XERCES_VERSION_REVISION)
00190 #define XERCES_VERSIONSTR     INVK_CAT2_SEP_UNDERSCORE(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR)
00191 
00192 // Xerces C++ Namespace string, concatenated with full version string
00193 #define XERCES_PRODUCT xercesc
00194 #define XERCES_CPP_NAMESPACE INVK_CAT3_RAW_NUMERIC_SEP_UNDERSCORE(XERCES_PRODUCT,XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR)
00195 
00196 // original from Xerces header
00197 #define Xerces_DLLVersionStr XERCES_FULLVERSIONSTR
00198 
00199 const char* const    gXercesVersionStr = XERCES_VERSIONSTR;
00200 const char* const    gXercesFullVersionStr = XERCES_FULLVERSIONSTR;
00201 const unsigned int   gXercesMajVersion = XERCES_VERSION_MAJOR;
00202 const unsigned int   gXercesMinVersion = XERCES_VERSION_MINOR;
00203 const unsigned int   gXercesRevision   = XERCES_VERSION_REVISION;
00204 
00205 // Xerces version numeric constants that can be used for conditional
00206 // compilation purposes.
00207 
00208 #define _XERCES_VERSION CALC_EXPANDED_FORM (XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR,XERCES_VERSION_REVISION)
00209 
00210 #endif // XERCESVERSION_HPP

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