Skip to content
Snippets Groups Projects
Commit 8e306af5 authored by PeiYong Zhang's avatar PeiYong Zhang
Browse files

loadAMsgSet() added

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@174506 13f79535-47bb-0310-9956-ffa450edef68
parent dc964f00
No related branches found
No related tags found
No related merge requests found
......@@ -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 @@ void XMLPlatformUtils::platformInit()
{
}
//
// 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment