You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2004/08/03 18:02:24 UTC
cvs commit: xml-xalan/c/src/xalanc/XPath XObjectFactoryDefault.cpp XObjectFactoryDefault.hpp
dbertoni 2004/08/03 09:02:24
Modified: c/src/xalanc/XPath XObjectFactoryDefault.cpp
XObjectFactoryDefault.hpp
Log:
Changed data members from pointer members to value members. Fixed typedef for block size.
Revision Changes Path
1.5 +7 -8 xml-xalan/c/src/xalanc/XPath/XObjectFactoryDefault.cpp
Index: XObjectFactoryDefault.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XObjectFactoryDefault.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XObjectFactoryDefault.cpp 26 Feb 2004 22:40:34 -0000 1.4
+++ XObjectFactoryDefault.cpp 3 Aug 2004 16:02:24 -0000 1.5
@@ -58,9 +58,9 @@
m_xnumberCache(),
m_xnodesetCache(),
m_xstringCache(),
- m_XNull(new XNull),
- m_xbooleanFalse(new XBoolean(false)),
- m_xbooleanTrue(new XBoolean(true))
+ m_xnull(),
+ m_xbooleanFalse(false),
+ m_xbooleanTrue(true)
{
}
@@ -266,16 +266,15 @@
const XObjectPtr
-XObjectFactoryDefault::createBoolean(
- bool theValue)
+XObjectFactoryDefault::createBoolean(bool theValue)
{
if (theValue == true)
{
- return XObjectPtr(m_xbooleanTrue.get());
+ return XObjectPtr(&m_xbooleanTrue);
}
else
{
- return XObjectPtr(m_xbooleanFalse.get());
+ return XObjectPtr(&m_xbooleanFalse);
}
}
@@ -284,7 +283,7 @@
const XObjectPtr
XObjectFactoryDefault::createNull()
{
- return XObjectPtr(m_XNull.get());
+ return XObjectPtr(&m_xnull);
}
1.6 +6 -17 xml-xalan/c/src/xalanc/XPath/XObjectFactoryDefault.hpp
Index: XObjectFactoryDefault.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XObjectFactoryDefault.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XObjectFactoryDefault.hpp 31 Jul 2004 06:05:06 -0000 1.5
+++ XObjectFactoryDefault.hpp 3 Aug 2004 16:02:24 -0000 1.6
@@ -36,8 +36,10 @@
+#include <xalanc/XPath/XBoolean.hpp>
#include <xalanc/XPath/XNodeSetAllocator.hpp>
#include <xalanc/XPath/XNodeSetNodeProxyAllocator.hpp>
+#include <xalanc/XPath/XNull.hpp>
#include <xalanc/XPath/XNumberAllocator.hpp>
#include <xalanc/XPath/XStringAllocator.hpp>
#include <xalanc/XPath/XStringAdapterAllocator.hpp>
@@ -48,13 +50,6 @@
-#if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
-#include <xalanc/XPath/XNull.hpp>
-#include <xalanc/XPath/XBoolean.hpp>
-#endif
-
-
-
#include <xalanc/Include/XalanAutoPtr.hpp>
@@ -63,12 +58,6 @@
-class XBoolean;
-class XNull;
-class XNumber;
-
-
-
/**
* This class handles the creation of XObjects and manages their lifetime.
*/
@@ -89,7 +78,7 @@
eXResultTreeFragCacheMax = 40
};
- typedef unsigned long size_type;
+ typedef XNodeSetAllocator::size_type size_type;
/**
* Construct a factory for creating XObjects.
@@ -212,11 +201,11 @@
XStringCacheType m_xstringCache;
- const XalanAutoPtr<XNull> m_XNull;
+ XNull m_xnull;
- const XalanAutoPtr<XBoolean> m_xbooleanFalse;
+ XBoolean m_xbooleanFalse;
- const XalanAutoPtr<XBoolean> m_xbooleanTrue;
+ XBoolean m_xbooleanTrue;
};
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org