peiyongz 2002/12/12 08:29:30
Modified: c/src/xercesc/util/Platforms/Tandem TandemPlatformUtils.cpp
Log:
loadAMsgSet() added
Revision Changes Path
1.4 +35 -0
xml-xerces/c/src/xercesc/util/Platforms/Tandem/TandemPlatformUtils.cpp
Index: TandemPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/Tandem/TandemPlatformUtils.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TandemPlatformUtils.cpp 4 Nov 2002 15:13:01 -0000 1.3
+++ TandemPlatformUtils.cpp 12 Dec 2002 16:29:30 -0000 1.4
@@ -56,6 +56,9 @@
/*
* $Log$
+ * Revision 1.4 2002/12/12 16:29:30 peiyongz
+ * loadAMsgSet() added
+ *
* Revision 1.3 2002/11/04 15:13:01 tng
* C++ Namespace Support.
*
@@ -101,6 +104,14 @@
#include <sys/timeb.h>
#include <string.h>
+#if defined (XML_USE_ICU_MESSAGELOADER)
+ #include <xercesc/util/MsgLoaders/ICU/ICUMsgLoader.hpp>
+#elif defined (XML_USE_ICONV_MESSAGELOADER)
+ #include <xercesc/util/MsgLoaders/MsgCatalog/MsgCatalogLoader.hpp>
+#else // use In-memory message loader
+ #include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp>
+#endif
+
XERCES_CPP_NAMESPACE_BEGIN
// ---------------------------------------------------------------------------
@@ -110,6 +121,30 @@
{
}
+//
+// This method is called by the platform independent part of this class
+// when client code asks to have one of the supported message sets loaded.
+// In our case, we use the ICU based message loader mechanism.
+//
+XMLMsgLoader* XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain)
+{
+ XMLMsgLoader* retVal;
+ try
+ {
+#if defined (XML_USE_ICU_MESSAGELOADER)
+ retVal = new ICUMsgLoader(msgDomain);
+#elif defined (XML_USE_ICONV_MESSAGELOADER)
+ retVal = new MsgCatalogLoader(msgDomain);
+#else
+ retVal = new InMemMsgLoader(msgDomain);
+#endif
+ }
+ catch(...)
+ {
+ panic(XMLPlatformUtils::Panic_CantLoadMsgDomain);
+ }
+ return retVal;
+}
// ---------------------------------------------------------------------------
// XMLPlatformUtils: File Methods
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]