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 2001/10/02 23:34:19 UTC

cvs commit: xml-xalan/c/src/XalanSourceTree XalanSourceTreeComment.cpp XalanSourceTreeComment.hpp XalanSourceTreeInit.cpp

dbertoni    01/10/02 14:34:19

  Modified:    c/src/XalanSourceTree XalanSourceTreeComment.cpp
                        XalanSourceTreeComment.hpp XalanSourceTreeInit.cpp
  Log:
  Make sure comment nodes return the proper pseudo-name.
  
  Revision  Changes    Path
  1.6       +25 -1     xml-xalan/c/src/XalanSourceTree/XalanSourceTreeComment.cpp
  
  Index: XalanSourceTreeComment.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeComment.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XalanSourceTreeComment.cpp	2001/09/25 21:13:04	1.5
  +++ XalanSourceTreeComment.cpp	2001/10/02 21:34:19	1.6
  @@ -120,7 +120,7 @@
   const XalanDOMString&
   XalanSourceTreeComment::getNodeName() const
   {
  -	return s_emptyString;
  +	return s_nameString;
   }
   
   
  @@ -488,4 +488,28 @@
   XalanSourceTreeComment::appendSiblingNode(XalanSourceTreeText*	theSibling)
   {
   	XalanSourceTreeHelper::appendSibling(this, m_nextSibling, theSibling);
  +}
  +
  +
  +
  +static XalanDOMString	s_nameString;
  +
  +
  +
  +const XalanDOMString&	XalanSourceTreeComment::s_nameString = ::s_nameString;
  +
  +
  +
  +void
  +XalanSourceTreeComment::initialize()
  +{
  +	::s_nameString = XALAN_STATIC_UCODE_STRING("#comment");
  +}
  +
  +
  +
  +void
  +XalanSourceTreeComment::terminate()
  +{
  +	releaseMemory(::s_nameString);
   }
  
  
  
  1.3       +21 -6     xml-xalan/c/src/XalanSourceTree/XalanSourceTreeComment.hpp
  
  Index: XalanSourceTreeComment.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeComment.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XalanSourceTreeComment.hpp	2000/12/17 22:26:58	1.2
  +++ XalanSourceTreeComment.hpp	2001/10/02 21:34:19	1.3
  @@ -91,6 +91,19 @@
   public:
   
   	/**
  +	 * Perform static initialization.  See class XalanSourceTreeInit.
  +	 */
  +	static void
  +	initialize();
  +
  +	/**
  +	 * Perform static shut down.  See class XalanSourceTreeInit.
  +	 */
  +	static void
  +	terminate();
  +
  +
  +	/**
   	 * Constructor.
   	 *
   	 * @param theData The text data of the node.
  @@ -646,17 +659,19 @@
   
   
   	// Data members...
  -	const XalanDOMString&		m_data;
  +	const XalanDOMString&			m_data;
  +
  +	XalanSourceTreeDocument*		m_ownerDocument;
   
  -	XalanSourceTreeDocument*	m_ownerDocument;
  +	XalanSourceTreeElement*			m_parentElement;
   
  -	XalanSourceTreeElement*		m_parentElement;
  +	XalanNode*						m_previousSibling;
   
  -	XalanNode*					m_previousSibling;
  +	XalanNode*						m_nextSibling;
   
  -	XalanNode*					m_nextSibling;
  +	unsigned int					m_index;
   
  -	unsigned int				m_index;
  +	static const XalanDOMString&	s_nameString;
   };
   
   
  
  
  
  1.4       +5 -0      xml-xalan/c/src/XalanSourceTree/XalanSourceTreeInit.cpp
  
  Index: XalanSourceTreeInit.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeInit.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XalanSourceTreeInit.cpp	2001/02/08 21:16:15	1.3
  +++ XalanSourceTreeInit.cpp	2001/10/02 21:34:19	1.4
  @@ -59,6 +59,7 @@
   
   
   
  +#include "XalanSourceTreeComment.hpp"
   #include "XalanSourceTreeDocument.hpp"
   #include "XalanSourceTreeText.hpp"
   
  @@ -100,6 +101,8 @@
   {
   	XalanSourceTreeDocument::initialize();
   
  +	XalanSourceTreeComment::initialize();
  +
   	XalanSourceTreeText::initialize();
   }
   
  @@ -109,6 +112,8 @@
   XalanSourceTreeInit::terminate()
   {
   	XalanSourceTreeText::terminate();
  +
  +	XalanSourceTreeComment::terminate();
   
   	XalanSourceTreeDocument::terminate();
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org