You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dm...@apache.org on 2004/11/08 19:12:36 UTC
cvs commit: xml-xalan/c/src/xalanc/XalanExe XalanExe.cpp
dmitryh 2004/11/08 10:12:36
Modified: c/src/xalanc/XalanExe XalanExe.cpp
Log:
Initial implementation on the pluggable memory management
Revision Changes Path
1.19 +28 -8 xml-xalan/c/src/xalanc/XalanExe/XalanExe.cpp
Index: XalanExe.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanExe/XalanExe.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- XalanExe.cpp 31 Aug 2004 14:20:28 -0000 1.18
+++ XalanExe.cpp 8 Nov 2004 18:12:36 -0000 1.19
@@ -126,17 +126,28 @@
XALAN_USING_XALAN(XalanDOMString)
XALAN_USING_XALAN(XalanMessageLoader)
XALAN_USING_XALAN(XalanMessages)
+ XALAN_USING_XALAN(XalanMemMgrs)
+ XALAN_USING_XALAN(MemoryManagerType)
+
+ MemoryManagerType& theManager = XalanMemMgrs::getDefaultXercesMemMgr();
+
+
bool bErrorState = true ; // means OK
- const XalanDOMString szXalanVersion = XalanMessageLoader::getMessage(XalanMessages::XalanExeHelpMenuXalanVersion_1Param, XALAN_FULLVERSIONDOT );
+ XalanDOMString szXalanVersion(theManager);
+ XalanMessageLoader::getMessage(XalanMessages::XalanExeHelpMenuXalanVersion_1Param, szXalanVersion, XALAN_FULLVERSIONDOT );
- const XalanDOMString szXercesVersion = XalanMessageLoader::getMessage(XalanMessages::XalanExeHelpMenuXercesVersion_1Param, XERCES_FULLVERSIONDOT);
+ XalanDOMString szXercesVersion(theManager);
+ XalanMessageLoader::getMessage(XalanMessages::XalanExeHelpMenuXercesVersion_1Param, szXercesVersion, XERCES_FULLVERSIONDOT);
try
{
- const XalanDOMString::CharVectorType cvtXalanVersion = szXalanVersion.transcode();
- const XalanDOMString::CharVectorType cvtXercesVersion = szXercesVersion.transcode();
+ XalanDOMString::CharVectorType cvtXalanVersion(theManager);
+ szXalanVersion.transcode(cvtXalanVersion);
+
+ XalanDOMString::CharVectorType cvtXercesVersion(theManager);
+ szXercesVersion.transcode(cvtXercesVersion);
cerr << &cvtXalanVersion[0] << endl;
cerr << &cvtXercesVersion[0]<< endl;
@@ -148,12 +159,18 @@
bErrorState = false;
}
+ XalanDOMString::CharVectorType cvtXalanExeHelpMenu(theManager);
+
+ XalanDOMString theBuffer(theManager);
+
for (int i = XalanMessages::XalanExeHelpMenu; bErrorState && ( i <= XalanMessages::XalanExeHelpMenu12 ); ++i)
{
try
{
- const XalanDOMString::CharVectorType cvtXalanExeHelpMenu =
- XalanMessageLoader::getMessage(XalanMessages::Codes(i)).transcode();
+
+ XalanMessageLoader::getMessage(XalanMessages::Codes(i), theBuffer);
+
+ theBuffer.transcode(cvtXalanExeHelpMenu);
cerr << &cvtXalanExeHelpMenu[0] << endl;
}
@@ -689,12 +706,15 @@
{
XALAN_USING_XALAN(XalanDOMString)
XALAN_USING_XALAN(XSLTResultTarget)
+ XALAN_USING_XALAN(MemoryManagerType)
+
+ MemoryManagerType& theManager = theTransformer.getMemoryManager();
- XSLTResultTarget theTarget;
+ XSLTResultTarget theTarget(theManager);
if (theParams.m_encoding != 0)
{
- theTarget.setEncoding(XalanDOMString(theParams.m_encoding));
+ theTarget.setEncoding(XalanDOMString(theParams.m_encoding, theManager));
}
if (theParams.m_outFileName != 0)
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org