Author: rleigh
Date: Sun Feb 18 23:07:07 2018
New Revision: 1824713
URL: http://svn.apache.org/viewvc?rev=1824713&view=rev
Log:
Generate XercesVersion.hpp
Added:
xerces/c/trunk/src/xercesc/util/XercesVersion.hpp.cmake.in
xerces/c/trunk/src/xercesc/util/XercesVersion.hpp.in
Removed:
xerces/c/trunk/src/xercesc/util/XercesVersion.hpp
xerces/c/trunk/src/xercesc/util/Xerces_version_config.hpp.cmake.in
xerces/c/trunk/src/xercesc/util/Xerces_version_config.hpp.in
Modified:
xerces/c/trunk/CMakeLists.txt
xerces/c/trunk/configure.ac
xerces/c/trunk/src/CMakeLists.txt
xerces/c/trunk/src/Makefile.am
Modified: xerces/c/trunk/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/CMakeLists.txt?rev=1824713&r1=1824712&r2=1824713&view=diff
==============================================================================
--- xerces/c/trunk/CMakeLists.txt (original)
+++ xerces/c/trunk/CMakeLists.txt Sun Feb 18 23:07:07 2018
@@ -56,6 +56,12 @@ foreach(line IN LISTS configure)
string(REGEX REPLACE "^INTERFACE_VERSION=(.*)" "\\1"
xerces_c_interface_version "${line}")
break()
endforeach()
+file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/configure.ac" configure
+ REGEX "^GRAMMAR_SERIALIZATION_LEVEL=.*")
+foreach(line IN LISTS configure)
+ string(REGEX REPLACE "^GRAMMAR_SERIALIZATION_LEVEL=(.*)" "\\1"
xerces_c_grammar_serialization_level "${line}")
+ break()
+endforeach()
message(STATUS "Configuring Apache Xerces-C++ version ${xerces_c_version}")
@@ -85,6 +91,8 @@ list(GET interface_version_parts 1 INTER
set(INTERFACE_VERSION_D
"${INTERFACE_VERSION_MAJOR}.${INTERFACE_VERSION_MINOR}")
set(INTERFACE_VERSION_U
"${INTERFACE_VERSION_MAJOR}_${INTERFACE_VERSION_MINOR}")
+set(XERCES_GRAMMAR_SERIALIZATION_LEVEL
"${xerces_c_grammar_serialization_level}")
+
set(EXTRA_DIST
xerces-c.spec
xerces-c.pc.in
@@ -143,8 +151,8 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/src/xercesc/util/Xerces_autoconf_config.hpp
@ONLY)
configure_file(
-
${CMAKE_CURRENT_SOURCE_DIR}/src/xercesc/util/Xerces_version_config.hpp.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/src/xercesc/util/Xerces_version_config.hpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/xercesc/util/XercesVersion.hpp.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/src/xercesc/util/XercesVersion.hpp
@ONLY)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/doc/style/dtd/entities.ent.in
Modified: xerces/c/trunk/configure.ac
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/configure.ac?rev=1824713&r1=1824712&r2=1824713&view=diff
==============================================================================
--- xerces/c/trunk/configure.ac (original)
+++ xerces/c/trunk/configure.ac Sun Feb 18 23:07:07 2018
@@ -26,6 +26,7 @@
AC_PREREQ(2.60)
AC_INIT([xerces-c],[3.2.1])
INTERFACE_VERSION=3.2
+GRAMMAR_SERIALIZATION_LEVEL=7
XERCES_VERSION_MAJOR=$(echo $PACKAGE_VERSION | cut -d. -f1)
XERCES_VERSION_MINOR=$(echo $PACKAGE_VERSION | cut -d. -f2)
@@ -49,12 +50,17 @@ AC_DEFINE_UNQUOTED([XERCES_VERSION_MAJOR
AC_DEFINE_UNQUOTED([XERCES_VERSION_MINOR], $XERCES_VERSION_MINOR, [Definition
of Xerces minor version])
AC_DEFINE_UNQUOTED([XERCES_VERSION_REVISION], $XERCES_VERSION_REVISION,
[Definition of Xerces patch version])
+AC_DEFINE_UNQUOTED([INTERFACE_VERSION_MAJOR], $INTERFACE_VERSION_MAJOR,
[Definition of Xerces interface major version])
+AC_DEFINE_UNQUOTED([INTERFACE_VERSION_MINOR], $INTERFACE_VERSION_MINOR,
[Definition of Xerces interface minor version])
+
+AC_DEFINE_UNQUOTED([XERCES_GRAMMAR_SERIALIZATION_LEVEL],
$GRAMMAR_SERIALIZATION_LEVEL, [Definition of Xerces grammar serialization
level])
+
AC_CONFIG_SRCDIR([src/Makefile.am])
AC_CONFIG_LIBOBJ_DIR([src])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h src/xercesc/util/Xerces_autoconf_config.hpp])
-AC_CONFIG_HEADER([src/xercesc/util/Xerces_version_config.hpp])
+AC_CONFIG_HEADER([src/xercesc/util/XercesVersion.hpp])
AC_CONFIG_FILES([Makefile
doc/Makefile
doc/Doxyfile
Modified: xerces/c/trunk/src/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/CMakeLists.txt?rev=1824713&r1=1824712&r2=1824713&view=diff
==============================================================================
--- xerces/c/trunk/src/CMakeLists.txt (original)
+++ xerces/c/trunk/src/CMakeLists.txt Sun Feb 18 23:07:07 2018
@@ -553,7 +553,6 @@ set(util_headers
xercesc/util/ValueVectorOf.hpp
xercesc/util/ValueVectorOf.c
xercesc/util/XercesDefs.hpp
- xercesc/util/XercesVersion.hpp
xercesc/util/XMemory.hpp
xercesc/util/XML256TableTranscoder.hpp
xercesc/util/XML88591Transcoder.hpp
@@ -1345,9 +1344,9 @@ unset(group_dir)
unset(group_files)
# Make sure cmake-generated Xerces_autoconf_config.hpp and
-# Xerces_version_config.hpp end up in a proper place when installed.
+# XercesVersion.hpp end up in a proper place when installed.
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/xercesc/util/Xerces_autoconf_config.hpp"
- "${CMAKE_CURRENT_BINARY_DIR}/xercesc/util/Xerces_version_config.hpp"
+ "${CMAKE_CURRENT_BINARY_DIR}/xercesc/util/XercesVersion.hpp"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/xercesc/util"
COMPONENT "development")
Modified: xerces/c/trunk/src/Makefile.am
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/Makefile.am?rev=1824713&r1=1824712&r2=1824713&view=diff
==============================================================================
--- xerces/c/trunk/src/Makefile.am (original)
+++ xerces/c/trunk/src/Makefile.am Sun Feb 18 23:07:07 2018
@@ -46,12 +46,12 @@ ${parsers_headers} ${sax_headers} ${sax2
${xinclude_headers}
# Make sure autoconf-generated Xerces_autoconf_config.hpp and
-# Xerces_version_config.hpp end up in a proper place when installed.
+# XercesVersion.hpp end up in a proper place when installed.
#
autoconfheadersdir = $(includedir)/xercesc/util
nodist_autoconfheaders_HEADERS = \
${top_builddir}/src/xercesc/util/Xerces_autoconf_config.hpp \
- ${top_builddir}/src/xercesc/util/Xerces_version_config.hpp
+ ${top_builddir}/src/xercesc/util/XercesVersion.hpp
# Compatibility library.
#
@@ -60,7 +60,7 @@ EXTRA_DIST = CMakeLists.txt \
stricmp.h strnicmp.h towlower.h towupper.h \
xercesc/NLS \
xercesc/util/Xerces_autoconf_config.hpp.cmake.in \
- xercesc/util/Xerces_version_config.hpp.cmake.in \
+ xercesc/util/XercesVersion.hpp.cmake.in \
xercesc/util/MsgLoaders/ICU/resources
libxerces_c_la_LIBADD = ${LTLIBOBJS}
@@ -694,7 +694,6 @@ util_headers = \
xercesc/util/ValueVectorOf.hpp \
xercesc/util/ValueVectorOf.c \
xercesc/util/XercesDefs.hpp \
- xercesc/util/XercesVersion.hpp \
xercesc/util/XMemory.hpp \
xercesc/util/XML256TableTranscoder.hpp \
xercesc/util/XML88591Transcoder.hpp \
Added: xerces/c/trunk/src/xercesc/util/XercesVersion.hpp.cmake.in
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XercesVersion.hpp.cmake.in?rev=1824713&view=auto
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XercesVersion.hpp.cmake.in (added)
+++ xerces/c/trunk/src/xercesc/util/XercesVersion.hpp.cmake.in Sun Feb 18
23:07:07 2018
@@ -0,0 +1,219 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id$
+ */
+
+#if !defined(XERCESC_INCLUDE_GUARD_XERCESVERSION_HPP)
+#define XERCESC_INCLUDE_GUARD_XERCESVERSION_HPP
+
+// ---------------------------------------------------------------------------
+// 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
+
+/**
+ * User Documentation for Xerces Version Values:
+ *
+ *
+ *
+ * Xerces Notes:
+ *
+ * Xerces Committers Documentation:
+ *
+ * Xerces committers normally only need to modify one or two of the
+ * following macros:
+ *
+ * XERCES_VERSION_MAJOR
+ * XERCES_VERSION_MINOR
+ * XERCES_VERSION_REVISION
+ *
+ * The integer values of these macros define the Xerces version number. All
+ * other constants and preprocessor macros are automatically generated from
+ * these three definitions.
+ *
+ * The macro XERCES_GRAMMAR_SERIALIZATION_LEVEL has been added so that
during
+ * development if users are using the latest code they can use the grammar
+ * serialization/deserialization features. Whenever a change is made to the
+ * serialization code this macro should be incremented.
+ *
+ * Xerces User Documentation:
+ *
+ * The following sections in the user documentation have examples based upon
+ * the following three version input values:
+ *
+ * #define XERCES_VERSION_MAJOR 19
+ * #define XERCES_VERSION_MINOR 3
+ * #define XERCES_VERSION_REVISION 74
+ *
+ * The minor and revision (patch level) numbers have two digits of resolution
+ * which means that '3' becomes '03' in this example. This policy guarantees
+ * that when using preprocessor macros, version 19.3.74 will be greater than
+ * version 1.94.74 since the first will expand to 190374 and the second to
+ * 19474.
+ *
+ * Preprocessor Macros:
+ *
+ * _XERCES_VERSION defines the primary preprocessor macro that users will
+ * introduce into their code to perform conditional compilation where the
+ * version of Xerces is detected in order to enable or disable version
+ * specific capabilities. The value of _XERCES_VERSION for the above example
+ * will be 190374. To use it a user would perform an operation such as the
+ * following:
+ *
+ * #if _XERCES_VERSION >= 190374
+ * // code specific to new version of Xerces...
+ * #else
+ * // old code here...
+ * #endif
+ *
+ * XERCES_FULLVERSIONSTR is a preprocessor macro that expands to a string
+ * constant whose value, for the above example, will be "19_3_74".
+ *
+ * XERCES_FULLVERSIONDOT is a preprocessor macro that expands to a string
+ * constant whose value, for the above example, will be "19.3.74".
+ *
+ * XERCES_VERSIONSTR is a preprocessor macro that expands to a string
+ * constant whose value, for the above example, will be "19_3". This
+ * particular macro is very dangerous if it were to be used for comparing
+ * version numbers since ordering will not be guaranteed.
+ *
+ * Xerces_DLLVersionStr is a preprocessor macro that expands to a string
+ * constant whose value, for the above example, will be "19_3_74". This
+ * macro is provided for backwards compatibility to pre-1.7 versions of
+ * Xerces.
+ *
+ * String Constants:
+ *
+ * gXercesVersionStr is a global string constant whose value corresponds to
+ * the value "19_3" for the above example.
+ *
+ * gXercesFullVersionStr is a global string constant whose value corresponds
+ * to the value "19_3_74" for the above example.
+ *
+ * Numeric Constants:
+ *
+ * gXercesMajVersion is a global integer constant whose value corresponds to
+ * the major version number. For the above example its value will be 19.
+ *
+ * gXercesMinVersion is a global integer constant whose value corresponds to
+ * the minor version number. For the above example its value will be 3.
+ *
+ * gXercesRevision is a global integer constant whose value corresponds to
+ * the revision (patch) version number. For the above example its value will
+ * be 74.
+ *
+ */
+
+// ---------------------------------------------------------------------------
+// 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
+
+/**
+ * MODIFY THESE NUMERIC VALUES TO COINCIDE WITH XERCES VERSION
+ * AND DO NOT MODIFY ANYTHING ELSE IN THIS VERSION HEADER FILE
+ */
+
+#define XERCES_VERSION_MAJOR @XERCES_VERSION_MAJOR@
+#define XERCES_VERSION_MINOR @XERCES_VERSION_MINOR@
+#define XERCES_VERSION_REVISION @XERCES_VERSION_REVISION@
+
+/***
+ *
+ * XERCES_GRAMMAR_SERIALIZATION_LEVEL = 4 SchemaAttDef, SchemaElementDecl
serialize fPSVIScope
+ * XERCES_GRAMMAR_SERIALIZATION_LEVEL = 5 XercesStep serializes the axis as
an int
+ * XERCES_GRAMMAR_SERIALIZATION_LEVEL = 6 added fIsExternal to XMLEntityDecl
+ * XERCES_GRAMMAR_SERIALIZATION_LEVEL = 7 size of line/column fields has
changed
+ *
+ ***/
+#define XERCES_GRAMMAR_SERIALIZATION_LEVEL @XERCES_GRAMMAR_SERIALIZATION_LEVEL@
+
+/** DO NOT MODIFY BELOW THIS LINE */
+
+/**
+ * MAGIC THAT AUTOMATICALLY GENERATES THE FOLLOWING:
+ *
+ * Xerces_DLLVersionStr, gXercesVersionStr, gXercesFullVersionStr,
+ * gXercesMajVersion, gXercesMinVersion, gXercesRevision
+ */
+
+// ---------------------------------------------------------------------------
+// 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
+
+// two argument concatenation routines
+#define CAT2_SEP_UNDERSCORE(a, b) #a "_" #b
+#define CAT2_SEP_PERIOD(a, b) #a "." #b
+#define CAT2_SEP_NIL(a, b) #a #b
+#define CAT2_RAW_NUMERIC(a, b) a ## b
+
+// two argument macro invokers
+#define INVK_CAT2_SEP_UNDERSCORE(a,b) CAT2_SEP_UNDERSCORE(a,b)
+#define INVK_CAT2_SEP_PERIOD(a,b) CAT2_SEP_PERIOD(a,b)
+#define INVK_CAT2_STR_SEP_NIL(a,b) CAT2_SEP_NIL(a,b)
+#define INVK_CAT2_RAW_NUMERIC(a,b) CAT2_RAW_NUMERIC(a,b)
+
+// ---------------------------------------------------------------------------
+// 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
+
+// three argument concatenation routines
+#define CAT3_SEP_UNDERSCORE(a, b, c) #a "_" #b "_" #c
+#define CAT3_SEP_PERIOD(a, b, c) #a "." #b "." #c
+#define CAT3_SEP_NIL(a, b, c) #a #b #c
+#define CAT3_RAW_NUMERIC(a, b, c) a ## b ## c
+#define CAT3_RAW_NUMERIC_SEP_UNDERSCORE(a, b, c) a ## _ ## b ## _ ## c
+
+// three argument macro invokers
+#define INVK_CAT3_SEP_UNDERSCORE(a,b,c) CAT3_SEP_UNDERSCORE(a,b,c)
+#define INVK_CAT3_SEP_PERIOD(a,b,c) CAT3_SEP_PERIOD(a,b,c)
+#define INVK_CAT3_SEP_NIL(a,b,c) CAT3_SEP_NIL(a,b,c)
+#define INVK_CAT3_RAW_NUMERIC(a,b,c) CAT3_RAW_NUMERIC(a,b,c)
+#define INVK_CAT3_RAW_NUMERIC_SEP_UNDERSCORE(a,b,c)
CAT3_RAW_NUMERIC_SEP_UNDERSCORE(a,b,c)
+
+// ---------------------------------------------------------------------------
+// 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
+
+#define MULTIPLY(factor,value) factor * value
+#define CALC_EXPANDED_FORM(a,b,c) ( MULTIPLY(10000,a) + MULTIPLY(100,b) +
MULTIPLY(1,c) )
+
+// ---------------------------------------------------------------------------
+// X E R C E S V E R S I O N I N F O R M A T I O N
+
+// Xerces version strings; these particular macros cannot be used for
+// conditional compilation as they are not numeric constants
+
+#define XERCES_FULLVERSIONSTR
INVK_CAT3_SEP_UNDERSCORE(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR,XERCES_VERSION_REVISION)
+#define XERCES_FULLVERSIONDOT
INVK_CAT3_SEP_PERIOD(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR,XERCES_VERSION_REVISION)
+#define XERCES_FULLVERSIONNUM
INVK_CAT3_SEP_NIL(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR,XERCES_VERSION_REVISION)
+#define XERCES_VERSIONSTR
INVK_CAT2_SEP_UNDERSCORE(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR)
+
+// Xerces C++ Namespace string, concatenated with full version string
+#define XERCES_PRODUCT xercesc
+#define XERCES_CPP_NAMESPACE
INVK_CAT3_RAW_NUMERIC_SEP_UNDERSCORE(XERCES_PRODUCT,XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR)
+
+// original from Xerces header
+#define Xerces_DLLVersionStr XERCES_FULLVERSIONSTR
+
+const char* const gXercesVersionStr = XERCES_VERSIONSTR;
+const char* const gXercesFullVersionStr = XERCES_FULLVERSIONSTR;
+const unsigned int gXercesMajVersion = XERCES_VERSION_MAJOR;
+const unsigned int gXercesMinVersion = XERCES_VERSION_MINOR;
+const unsigned int gXercesRevision = XERCES_VERSION_REVISION;
+
+// Xerces version numeric constants that can be used for conditional
+// compilation purposes.
+
+#define _XERCES_VERSION CALC_EXPANDED_FORM
(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR,XERCES_VERSION_REVISION)
+
+#endif // XERCESVERSION_HPP
Added: xerces/c/trunk/src/xercesc/util/XercesVersion.hpp.in
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XercesVersion.hpp.in?rev=1824713&view=auto
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XercesVersion.hpp.in (added)
+++ xerces/c/trunk/src/xercesc/util/XercesVersion.hpp.in Sun Feb 18 23:07:07
2018
@@ -0,0 +1,219 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id: XercesVersion.hpp 1824295 2018-02-15 11:17:15Z rleigh $
+ */
+
+#if !defined(XERCESC_INCLUDE_GUARD_XERCESVERSION_HPP)
+#define XERCESC_INCLUDE_GUARD_XERCESVERSION_HPP
+
+// ---------------------------------------------------------------------------
+// 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
+
+/**
+ * User Documentation for Xerces Version Values:
+ *
+ *
+ *
+ * Xerces Notes:
+ *
+ * Xerces Committers Documentation:
+ *
+ * Xerces committers normally only need to modify one or two of the
+ * following macros:
+ *
+ * XERCES_VERSION_MAJOR
+ * XERCES_VERSION_MINOR
+ * XERCES_VERSION_REVISION
+ *
+ * The integer values of these macros define the Xerces version number. All
+ * other constants and preprocessor macros are automatically generated from
+ * these three definitions.
+ *
+ * The macro XERCES_GRAMMAR_SERIALIZATION_LEVEL has been added so that
during
+ * development if users are using the latest code they can use the grammar
+ * serialization/deserialization features. Whenever a change is made to the
+ * serialization code this macro should be incremented.
+ *
+ * Xerces User Documentation:
+ *
+ * The following sections in the user documentation have examples based upon
+ * the following three version input values:
+ *
+ * #define XERCES_VERSION_MAJOR 19
+ * #define XERCES_VERSION_MINOR 3
+ * #define XERCES_VERSION_REVISION 74
+ *
+ * The minor and revision (patch level) numbers have two digits of resolution
+ * which means that '3' becomes '03' in this example. This policy guarantees
+ * that when using preprocessor macros, version 19.3.74 will be greater than
+ * version 1.94.74 since the first will expand to 190374 and the second to
+ * 19474.
+ *
+ * Preprocessor Macros:
+ *
+ * _XERCES_VERSION defines the primary preprocessor macro that users will
+ * introduce into their code to perform conditional compilation where the
+ * version of Xerces is detected in order to enable or disable version
+ * specific capabilities. The value of _XERCES_VERSION for the above example
+ * will be 190374. To use it a user would perform an operation such as the
+ * following:
+ *
+ * #if _XERCES_VERSION >= 190374
+ * // code specific to new version of Xerces...
+ * #else
+ * // old code here...
+ * #endif
+ *
+ * XERCES_FULLVERSIONSTR is a preprocessor macro that expands to a string
+ * constant whose value, for the above example, will be "19_3_74".
+ *
+ * XERCES_FULLVERSIONDOT is a preprocessor macro that expands to a string
+ * constant whose value, for the above example, will be "19.3.74".
+ *
+ * XERCES_VERSIONSTR is a preprocessor macro that expands to a string
+ * constant whose value, for the above example, will be "19_3". This
+ * particular macro is very dangerous if it were to be used for comparing
+ * version numbers since ordering will not be guaranteed.
+ *
+ * Xerces_DLLVersionStr is a preprocessor macro that expands to a string
+ * constant whose value, for the above example, will be "19_3_74". This
+ * macro is provided for backwards compatibility to pre-1.7 versions of
+ * Xerces.
+ *
+ * String Constants:
+ *
+ * gXercesVersionStr is a global string constant whose value corresponds to
+ * the value "19_3" for the above example.
+ *
+ * gXercesFullVersionStr is a global string constant whose value corresponds
+ * to the value "19_3_74" for the above example.
+ *
+ * Numeric Constants:
+ *
+ * gXercesMajVersion is a global integer constant whose value corresponds to
+ * the major version number. For the above example its value will be 19.
+ *
+ * gXercesMinVersion is a global integer constant whose value corresponds to
+ * the minor version number. For the above example its value will be 3.
+ *
+ * gXercesRevision is a global integer constant whose value corresponds to
+ * the revision (patch) version number. For the above example its value will
+ * be 74.
+ *
+ */
+
+// ---------------------------------------------------------------------------
+// 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
+
+/**
+ * MODIFY THESE NUMERIC VALUES TO COINCIDE WITH XERCES VERSION
+ * AND DO NOT MODIFY ANYTHING ELSE IN THIS VERSION HEADER FILE
+ */
+
+#undef XERCES_VERSION_MAJOR
+#undef XERCES_VERSION_MINOR
+#undef XERCES_VERSION_REVISION
+
+/***
+ *
+ * XERCES_GRAMMAR_SERIALIZATION_LEVEL = 4 SchemaAttDef, SchemaElementDecl
serialize fPSVIScope
+ * XERCES_GRAMMAR_SERIALIZATION_LEVEL = 5 XercesStep serializes the axis as
an int
+ * XERCES_GRAMMAR_SERIALIZATION_LEVEL = 6 added fIsExternal to XMLEntityDecl
+ * XERCES_GRAMMAR_SERIALIZATION_LEVEL = 7 size of line/column fields has
changed
+ *
+ ***/
+#undef XERCES_GRAMMAR_SERIALIZATION_LEVEL
+
+/** DO NOT MODIFY BELOW THIS LINE */
+
+/**
+ * MAGIC THAT AUTOMATICALLY GENERATES THE FOLLOWING:
+ *
+ * Xerces_DLLVersionStr, gXercesVersionStr, gXercesFullVersionStr,
+ * gXercesMajVersion, gXercesMinVersion, gXercesRevision
+ */
+
+// ---------------------------------------------------------------------------
+// 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
+
+// two argument concatenation routines
+#define CAT2_SEP_UNDERSCORE(a, b) #a "_" #b
+#define CAT2_SEP_PERIOD(a, b) #a "." #b
+#define CAT2_SEP_NIL(a, b) #a #b
+#define CAT2_RAW_NUMERIC(a, b) a ## b
+
+// two argument macro invokers
+#define INVK_CAT2_SEP_UNDERSCORE(a,b) CAT2_SEP_UNDERSCORE(a,b)
+#define INVK_CAT2_SEP_PERIOD(a,b) CAT2_SEP_PERIOD(a,b)
+#define INVK_CAT2_STR_SEP_NIL(a,b) CAT2_SEP_NIL(a,b)
+#define INVK_CAT2_RAW_NUMERIC(a,b) CAT2_RAW_NUMERIC(a,b)
+
+// ---------------------------------------------------------------------------
+// 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
+
+// three argument concatenation routines
+#define CAT3_SEP_UNDERSCORE(a, b, c) #a "_" #b "_" #c
+#define CAT3_SEP_PERIOD(a, b, c) #a "." #b "." #c
+#define CAT3_SEP_NIL(a, b, c) #a #b #c
+#define CAT3_RAW_NUMERIC(a, b, c) a ## b ## c
+#define CAT3_RAW_NUMERIC_SEP_UNDERSCORE(a, b, c) a ## _ ## b ## _ ## c
+
+// three argument macro invokers
+#define INVK_CAT3_SEP_UNDERSCORE(a,b,c) CAT3_SEP_UNDERSCORE(a,b,c)
+#define INVK_CAT3_SEP_PERIOD(a,b,c) CAT3_SEP_PERIOD(a,b,c)
+#define INVK_CAT3_SEP_NIL(a,b,c) CAT3_SEP_NIL(a,b,c)
+#define INVK_CAT3_RAW_NUMERIC(a,b,c) CAT3_RAW_NUMERIC(a,b,c)
+#define INVK_CAT3_RAW_NUMERIC_SEP_UNDERSCORE(a,b,c)
CAT3_RAW_NUMERIC_SEP_UNDERSCORE(a,b,c)
+
+// ---------------------------------------------------------------------------
+// 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
+
+#define MULTIPLY(factor,value) factor * value
+#define CALC_EXPANDED_FORM(a,b,c) ( MULTIPLY(10000,a) + MULTIPLY(100,b) +
MULTIPLY(1,c) )
+
+// ---------------------------------------------------------------------------
+// X E R C E S V E R S I O N I N F O R M A T I O N
+
+// Xerces version strings; these particular macros cannot be used for
+// conditional compilation as they are not numeric constants
+
+#define XERCES_FULLVERSIONSTR
INVK_CAT3_SEP_UNDERSCORE(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR,XERCES_VERSION_REVISION)
+#define XERCES_FULLVERSIONDOT
INVK_CAT3_SEP_PERIOD(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR,XERCES_VERSION_REVISION)
+#define XERCES_FULLVERSIONNUM
INVK_CAT3_SEP_NIL(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR,XERCES_VERSION_REVISION)
+#define XERCES_VERSIONSTR
INVK_CAT2_SEP_UNDERSCORE(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR)
+
+// Xerces C++ Namespace string, concatenated with full version string
+#define XERCES_PRODUCT xercesc
+#define XERCES_CPP_NAMESPACE
INVK_CAT3_RAW_NUMERIC_SEP_UNDERSCORE(XERCES_PRODUCT,XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR)
+
+// original from Xerces header
+#define Xerces_DLLVersionStr XERCES_FULLVERSIONSTR
+
+const char* const gXercesVersionStr = XERCES_VERSIONSTR;
+const char* const gXercesFullVersionStr = XERCES_FULLVERSIONSTR;
+const unsigned int gXercesMajVersion = XERCES_VERSION_MAJOR;
+const unsigned int gXercesMinVersion = XERCES_VERSION_MINOR;
+const unsigned int gXercesRevision = XERCES_VERSION_REVISION;
+
+// Xerces version numeric constants that can be used for conditional
+// compilation purposes.
+
+#define _XERCES_VERSION CALC_EXPANDED_FORM
(XERCES_VERSION_MAJOR,XERCES_VERSION_MINOR,XERCES_VERSION_REVISION)
+
+#endif // XERCESVERSION_HPP
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]