You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/11/04 16:24:50 UTC
cvs commit: xml-xerces/c/tools/NLS/Xlat Xlat.cpp Xlat_CppSrc.cpp Xlat_MsgCatalog.cpp
tng 2002/11/04 07:24:50
Modified: c/tools/IANACharset IANACharset.cpp
c/tools/NLS/Xlat Xlat.cpp Xlat_CppSrc.cpp
Xlat_MsgCatalog.cpp
Log:
C++ Namespace Support.
Revision Changes Path
1.2 +27 -13 xml-xerces/c/tools/IANACharset/IANACharset.cpp
Index: IANACharset.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/tools/IANACharset/IANACharset.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- IANACharset.cpp 18 Jul 2002 20:15:32 -0000 1.1
+++ IANACharset.cpp 4 Nov 2002 15:24:50 -0000 1.2
@@ -1,37 +1,37 @@
/*
* The Apache Software License, Version 1.1
- *
+ *
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
+ * notice, this list of conditions and the following disclaimer.
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
- *
+ *
* 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
+ * if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
- *
+ *
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
- * software without prior written permission. For written
+ * software without prior written permission. For written
* permission, please contact apache\@apache.org.
- *
+ *
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
- *
+ *
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
@@ -57,6 +57,9 @@
/*
* $Log$
+ * Revision 1.2 2002/11/04 15:24:50 tng
+ * C++ Namespace Support.
+ *
* Revision 1.1 2002/07/18 20:15:32 knoaman
* Initial checkin: feature to control strict IANA encoding name.
*
@@ -210,6 +213,10 @@
L"// This file was generated from the IANA charset source.\n"
L"// so do not edit this file directly!!\n"
L"// ----------------------------------------------------------------\n\n"
+ L"#if !defined(IANAENCODINGS_HPP)\n"
+ L"#define IANAENCODINGS_HPP\n\n"
+ L"#include <xercesc/util/XercesDefs.hpp>\n\n"
+ L"XERCES_CPP_NAMESPACE_BEGIN\n\n"
);
//
@@ -251,6 +258,13 @@
// Output the const size value
fwprintf(gOutFile, L"const unsigned int gEncodingArraySize = %d;\n\n", encCount);
+
+ fwprintf
+ (
+ gOutFile
+ , L"XERCES_CPP_NAMESPACE_END\n\n"
+ L"#endif\n\n"
+ );
// Close the output file
fclose(gOutFile);
1.14 +16 -5 xml-xerces/c/tools/NLS/Xlat/Xlat.cpp
Index: Xlat.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/tools/NLS/Xlat/Xlat.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Xlat.cpp 30 Sep 2002 22:09:58 -0000 1.13
+++ Xlat.cpp 4 Nov 2002 15:24:50 -0000 1.14
@@ -57,6 +57,9 @@
/*
* $Log$
+ * Revision 1.14 2002/11/04 15:24:50 tng
+ * C++ Namespace Support.
+ *
* Revision 1.13 2002/09/30 22:09:58 peiyongz
* To generate icu resource file (in text) for error message.
*
@@ -405,7 +408,7 @@
{
// Nest entire code in an inner block.
-
+
DOMDocument* srcDoc;
const unsigned int bufSize = 4095;
XMLCh tmpFileBuf[bufSize + 1];
@@ -459,7 +462,7 @@
case OutFormat_MsgCatalog :
formatter = new MsgCatFormatter;
break;
-
+
case OutFormat_ResBundle:
formatter = new ICUResBundFormatter;
break;
@@ -579,8 +582,13 @@
// If its not the exception domain, then we need a header included
if (XMLString::compareString(domainStr, XMLUni::fgExceptDomain))
- fwprintf(outHeader, L"#include <xercesc/framework/XMLErrorReporter.hpp>\n\n");
+ fwprintf(outHeader, L"#include <xercesc/framework/XMLErrorReporter.hpp>\n");
+ // Write out the namespace declaration
+ fwprintf(outHeader, L"#include <xercesc/util/XercesDefs.hpp>\n\n");
+ fwprintf(outHeader, L"XERCES_CPP_NAMESPACE_BEGIN\n\n");
+
+ // Now the message codes
fwprintf(outHeader, L"class %s\n{\npublic :\n enum Codes\n {\n", errNameSpace);
// Tell the formatter that a new domain is starting
@@ -747,8 +755,11 @@
);
}
- // And close out the class declaration and the header file
- fwprintf(outHeader, L"};\n#endif\n\n");
+
+ // And close out the class declaration, the namespace declaration and the header file
+ fwprintf(outHeader, L"};\n\n");
+ fwprintf(outHeader, L"XERCES_CPP_NAMESPACE_END\n\n");
+ fwprintf(outHeader, L"#endif\n\n");
fclose(outHeader);
}
1.6 +10 -0 xml-xerces/c/tools/NLS/Xlat/Xlat_CppSrc.cpp
Index: Xlat_CppSrc.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/tools/NLS/Xlat/Xlat_CppSrc.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Xlat_CppSrc.cpp 31 Jul 2002 18:39:53 -0000 1.5
+++ Xlat_CppSrc.cpp 4 Nov 2002 15:24:50 -0000 1.6
@@ -56,6 +56,9 @@
/*
* $Log$
+ * Revision 1.6 2002/11/04 15:24:50 tng
+ * C++ Namespace Support.
+ *
* Revision 1.5 2002/07/31 18:39:53 tng
* [Bug 3788] very long lines in CppErrMsgs_EN_US.hpp causes problems for OS390 compiler.
*
@@ -127,6 +130,11 @@
void CppSrcFormatter::endOutput()
{
+ fwprintf
+ (
+ fOutFl,
+ L"XERCES_CPP_NAMESPACE_END\n\n"
+ );
// Close the output file
fclose(fOutFl);
}
@@ -261,5 +269,7 @@
L"// This file was generated from the XML error message source.\n"
L"// so do not edit this file directly!!\n"
L"// ----------------------------------------------------------------\n\n"
+ L"#include <xercesc/util/XercesDefs.hpp>\n\n"
+ L"XERCES_CPP_NAMESPACE_BEGIN\n\n"
);
}
1.6 +34 -12 xml-xerces/c/tools/NLS/Xlat/Xlat_MsgCatalog.cpp
Index: Xlat_MsgCatalog.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/tools/NLS/Xlat/Xlat_MsgCatalog.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Xlat_MsgCatalog.cpp 2 Mar 2000 19:55:53 -0000 1.5
+++ Xlat_MsgCatalog.cpp 4 Nov 2002 15:24:50 -0000 1.6
@@ -1,37 +1,37 @@
/*
* The Apache Software License, Version 1.1
- *
+ *
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
+ * notice, this list of conditions and the following disclaimer.
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
- *
+ *
* 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
+ * if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
- *
+ *
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
- * software without prior written permission. For written
+ * software without prior written permission. For written
* permission, please contact apache\@apache.org.
- *
+ *
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
- *
+ *
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
@@ -56,6 +56,9 @@
/*
* $Log$
+ * Revision 1.6 2002/11/04 15:24:50 tng
+ * C++ Namespace Support.
+ *
* Revision 1.5 2000/03/02 19:55:53 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -133,6 +136,12 @@
void MsgCatFormatter::endOutput()
{
+ fwprintf
+ (
+ fOutHpp
+ , L"\nXERCES_CPP_NAMESPACE_END\n\n"
+ );
+
// Close the output files
fclose(fOutFl);
fclose(fOutHpp);
@@ -212,6 +221,17 @@
wprintf(L"Could not open the output file: %s\n\n", tmpBuf);
throw ErrReturn_OutFileOpenFailed;
}
+
+ fwprintf
+ (
+ fOutHpp
+ , L"// ----------------------------------------------------------------\n"
+ L"// This file was generated from the XML error message source.\n"
+ L"// so do not edit this file directly!!\n"
+ L"// ----------------------------------------------------------------\n\n"
+ L"#include <xercesc/util/XercesDefs.hpp>\n\n"
+ L"XERCES_CPP_NAMESPACE_BEGIN\n\n"
+ );
// Reset the sequence id
fSeqId = 1;
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org