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...@locus.apache.org on 2000/07/14 00:47:40 UTC

cvs commit: xml-xalan/c/src/XPath XBoolean.cpp XBoolean.hpp XNodeSet.cpp XNodeSet.hpp XNull.cpp XNull.hpp XNumber.cpp XNumber.hpp XObject.hpp XResultTreeFrag.cpp XResultTreeFrag.hpp XSpan.cpp XSpan.hpp XString.cpp XString.hpp XUnknown.cpp XUnknown.hpp

dbertoni    00/07/13 15:47:39

  Modified:    c/src/XPath XBoolean.cpp XBoolean.hpp XNodeSet.cpp
                        XNodeSet.hpp XNull.cpp XNull.hpp XNumber.cpp
                        XNumber.hpp XObject.hpp XResultTreeFrag.cpp
                        XResultTreeFrag.hpp XSpan.cpp XSpan.hpp XString.cpp
                        XString.hpp XUnknown.cpp XUnknown.hpp
  Log:
  Added void* parameter to clone to support cloning with placement new.
  
  Revision  Changes    Path
  1.5       +2 -2      xml-xalan/c/src/XPath/XBoolean.cpp
  
  Index: XBoolean.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XBoolean.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XBoolean.cpp	2000/07/06 20:16:27	1.4
  +++ XBoolean.cpp	2000/07/13 22:47:13	1.5
  @@ -108,9 +108,9 @@
   #else
   XBoolean*
   #endif
  -XBoolean::clone() const
  +XBoolean::clone(void*	theAddress) const
   {
  -	return new XBoolean(*this);
  +	return theAddress == 0 ? new XBoolean(*this) : new (theAddress) XBoolean(*this);
   };
   
   
  
  
  
  1.6       +1 -1      xml-xalan/c/src/XPath/XBoolean.hpp
  
  Index: XBoolean.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XBoolean.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XBoolean.hpp	2000/07/06 20:16:27	1.5
  +++ XBoolean.hpp	2000/07/13 22:47:14	1.6
  @@ -94,7 +94,7 @@
   #else
   	virtual XBoolean*
   #endif
  -	clone() const;
  +	clone(void*		theAddress = 0) const;
   
   	virtual eObjectType
   	getType() const;
  
  
  
  1.9       +2 -2      xml-xalan/c/src/XPath/XNodeSet.cpp
  
  Index: XNodeSet.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNodeSet.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XNodeSet.cpp	2000/07/13 22:22:31	1.8
  +++ XNodeSet.cpp	2000/07/13 22:47:14	1.9
  @@ -143,9 +143,9 @@
   #else
   XNodeSet*
   #endif
  -XNodeSet::clone() const
  +XNodeSet::clone(void*	theAddress) const
   {
  -	return new XNodeSet(*this, false);
  +	return theAddress == 0 ? new XNodeSet(*this) : new (theAddress) XNodeSet(*this);
   };
   
   
  
  
  
  1.8       +1 -1      xml-xalan/c/src/XPath/XNodeSet.hpp
  
  Index: XNodeSet.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNodeSet.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XNodeSet.hpp	2000/07/07 22:53:27	1.7
  +++ XNodeSet.hpp	2000/07/13 22:47:14	1.8
  @@ -149,7 +149,7 @@
   #else
   	virtual XNodeSet*
   #endif
  -	clone() const;
  +	clone(void*		theAddress = 0) const;
   
   	virtual	eObjectType
   	getType() const;
  
  
  
  1.5       +2 -2      xml-xalan/c/src/XPath/XNull.cpp
  
  Index: XNull.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNull.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XNull.cpp	2000/07/06 20:16:27	1.4
  +++ XNull.cpp	2000/07/13 22:47:15	1.5
  @@ -101,9 +101,9 @@
   #else
   XNull*
   #endif
  -XNull::clone() const
  +XNull::clone(void*	theAddress) const
   {
  -	return new XNull(*this, false);
  +	return theAddress == 0 ? new XNull(*this) : new (theAddress) XNull(*this);
   };
   
   
  
  
  
  1.6       +1 -1      xml-xalan/c/src/XPath/XNull.hpp
  
  Index: XNull.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNull.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XNull.hpp	2000/07/06 20:16:27	1.5
  +++ XNull.hpp	2000/07/13 22:47:15	1.6
  @@ -119,7 +119,7 @@
   #else
   	virtual XNull*
   #endif
  -	clone() const;
  +	clone(void*		theAddress = 0) const;
   
   	virtual eObjectType
   	getType() const;
  
  
  
  1.7       +2 -2      xml-xalan/c/src/XPath/XNumber.cpp
  
  Index: XNumber.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNumber.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XNumber.cpp	2000/07/07 22:53:27	1.6
  +++ XNumber.cpp	2000/07/13 22:47:15	1.7
  @@ -100,9 +100,9 @@
   #else
   XNumber*
   #endif
  -XNumber::clone() const
  +XNumber::clone(void*	theAddress) const
   {
  -	return new XNumber(*this);
  +	return theAddress == 0 ? new XNumber(*this) : new (theAddress) XNumber(*this);
   };
   
   
  
  
  
  1.7       +1 -1      xml-xalan/c/src/XPath/XNumber.hpp
  
  Index: XNumber.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNumber.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XNumber.hpp	2000/07/07 22:53:28	1.6
  +++ XNumber.hpp	2000/07/13 22:47:15	1.7
  @@ -100,7 +100,7 @@
   #else
   	virtual XNumber*
   #endif
  -	clone() const;
  +	clone(void*		theAddress = 0) const;
   
   	virtual eObjectType
   	getType() const;
  
  
  
  1.8       +2 -1      xml-xalan/c/src/XPath/XObject.hpp
  
  Index: XObject.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XObject.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XObject.hpp	2000/07/12 21:46:51	1.7
  +++ XObject.hpp	2000/07/13 22:47:16	1.8
  @@ -99,10 +99,11 @@
   	/**
   	 * Clone the instance
   	 *
  +	 * @param If theAddress is not null, the XObject will clone itself into that address.
   	 * @return a clone of the instance.
   	 */
   	virtual XObject*
  -	clone() const = 0;
  +	clone(void*		theAddress = 0) const = 0;
   
   	/**
   	 * Given a request type, return the equivalent string. 
  
  
  
  1.7       +2 -2      xml-xalan/c/src/XPath/XResultTreeFrag.cpp
  
  Index: XResultTreeFrag.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XResultTreeFrag.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XResultTreeFrag.cpp	2000/07/13 22:22:32	1.6
  +++ XResultTreeFrag.cpp	2000/07/13 22:47:16	1.7
  @@ -111,9 +111,9 @@
   #else
   XResultTreeFrag*
   #endif
  -XResultTreeFrag::clone() const
  +XResultTreeFrag::clone(void*	theAddress) const
   {
  -	return new XResultTreeFrag(*this, false);
  +	return theAddress == 0 ? new XResultTreeFrag(*this) : new (theAddress) XResultTreeFrag(*this);
   };
   
   
  
  
  
  1.7       +1 -1      xml-xalan/c/src/XPath/XResultTreeFrag.hpp
  
  Index: XResultTreeFrag.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XResultTreeFrag.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XResultTreeFrag.hpp	2000/07/06 20:16:28	1.6
  +++ XResultTreeFrag.hpp	2000/07/13 22:47:16	1.7
  @@ -120,7 +120,7 @@
   #else
   	virtual XResultTreeFrag*
   #endif
  -	clone() const;
  +	clone(void*		theAddress = 0) const;
   
   	virtual eObjectType
   	getType() const;
  
  
  
  1.4       +2 -2      xml-xalan/c/src/XPath/XSpan.cpp
  
  Index: XSpan.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XSpan.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XSpan.cpp	2000/07/06 20:16:28	1.3
  +++ XSpan.cpp	2000/07/13 22:47:17	1.4
  @@ -120,9 +120,9 @@
   #else
   XSpan*
   #endif
  -XSpan::clone() const
  +XSpan::clone(void*	theAddress) const
   {
  -	return new XSpan(*this);
  +	return theAddress == 0 ? new XSpan(*this) : new (theAddress) XSpan(*this);
   };
   
   
  
  
  
  1.5       +1 -1      xml-xalan/c/src/XPath/XSpan.hpp
  
  Index: XSpan.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XSpan.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XSpan.hpp	2000/07/06 20:16:28	1.4
  +++ XSpan.hpp	2000/07/13 22:47:17	1.5
  @@ -119,7 +119,7 @@
   #else
   	virtual XSpan*
   #endif
  -	clone() const;
  +	clone(void*		theAddress = 0) const;
   
   	/**
   	 * Get the start span offset from the first node, or -1 if offset isn't
  
  
  
  1.8       +2 -2      xml-xalan/c/src/XPath/XString.cpp
  
  Index: XString.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XString.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XString.cpp	2000/07/13 22:22:32	1.7
  +++ XString.cpp	2000/07/13 22:47:18	1.8
  @@ -110,9 +110,9 @@
   #else
   XString*
   #endif
  -XString::clone() const
  +XString::clone(void*	theAddress) const
   {
  -	return new XString(*this);
  +	return theAddress == 0 ? new XString(*this) : new (theAddress) XString(*this);
   };
   
   
  
  
  
  1.8       +1 -1      xml-xalan/c/src/XPath/XString.hpp
  
  Index: XString.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XString.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XString.hpp	2000/07/07 22:53:28	1.7
  +++ XString.hpp	2000/07/13 22:47:18	1.8
  @@ -112,7 +112,7 @@
   #else
   	virtual XString*
   #endif
  -	clone() const;
  +	clone(void*		theAddress = 0) const;
   
   	virtual	eObjectType
   	getType() const;
  
  
  
  1.5       +2 -2      xml-xalan/c/src/XPath/XUnknown.cpp
  
  Index: XUnknown.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XUnknown.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XUnknown.cpp	2000/07/06 20:16:29	1.4
  +++ XUnknown.cpp	2000/07/13 22:47:18	1.5
  @@ -97,9 +97,9 @@
   #else
   XUnknown*
   #endif
  -XUnknown::clone() const
  +XUnknown::clone(void*	theAddress) const
   {
  -	return new XUnknown(*this);
  +	return theAddress == 0 ? new XUnknown(*this) : new (theAddress) XUnknown(*this);
   };
   
   
  
  
  
  1.6       +1 -1      xml-xalan/c/src/XPath/XUnknown.hpp
  
  Index: XUnknown.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XUnknown.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XUnknown.hpp	2000/07/06 20:16:29	1.5
  +++ XUnknown.hpp	2000/07/13 22:47:19	1.6
  @@ -100,7 +100,7 @@
   #else
   	virtual XUnknown*
   #endif
  -	clone() const;
  +	clone(void*		theAddress = 0) const;
   
   	virtual eObjectType
   	getType() const;