Return-Path: Delivered-To: apmail-xml-xalan-cvs-archive@www.apache.org Received: (qmail 22340 invoked from network); 26 Oct 2003 00:41:05 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 26 Oct 2003 00:41:05 -0000 Received: (qmail 85945 invoked by uid 500); 26 Oct 2003 00:40:49 -0000 Delivered-To: apmail-xml-xalan-cvs-archive@xml.apache.org Received: (qmail 85927 invoked by uid 500); 26 Oct 2003 00:40:49 -0000 Mailing-List: contact xalan-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: Delivered-To: mailing list xalan-cvs@xml.apache.org Received: (qmail 85914 invoked from network); 26 Oct 2003 00:40:49 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 26 Oct 2003 00:40:49 -0000 Received: (qmail 22335 invoked by uid 1034); 26 Oct 2003 00:41:04 -0000 Date: 26 Oct 2003 00:41:04 -0000 Message-ID: <20031026004104.22334.qmail@minotaur.apache.org> From: dbertoni@apache.org To: xml-xalan-cvs@apache.org Subject: cvs commit: xml-xalan/c/src/xalanc/XPath XalanDocumentFragmentNodeRefListBaseProxy.cpp XalanDocumentFragmentNodeRefListBaseProxy.hpp FunctionID.cpp FunctionID.hpp XNodeSetBase.cpp XNodeSetBase.hpp XNodeSetResultTreeFragProxy.cpp XNodeSetResultTreeFragProxy.hpp XObject.cpp XObject.hpp XObjectResultTreeFragProxy.cpp XObjectResultTreeFragProxy.hpp XObjectResultTreeFragProxyBase.cpp XObjectResultTreeFragProxyBase.hpp XObjectTypeCallback.hpp XPathExecutionContext.hpp XStringBase.cpp XStringBase.hpp ResultTreeFragBase.cpp ResultTreeFragBase.hpp X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N dbertoni 2003/10/25 17:41:04 Modified: c/src/xalanc/XPath FunctionID.cpp FunctionID.hpp XNodeSetBase.cpp XNodeSetBase.hpp XNodeSetResultTreeFragProxy.cpp XNodeSetResultTreeFragProxy.hpp XObject.cpp XObject.hpp XObjectResultTreeFragProxy.cpp XObjectResultTreeFragProxy.hpp XObjectResultTreeFragProxyBase.cpp XObjectResultTreeFragProxyBase.hpp XObjectTypeCallback.hpp XPathExecutionContext.hpp XStringBase.cpp XStringBase.hpp Added: c/src/xalanc/XPath XalanDocumentFragmentNodeRefListBaseProxy.cpp XalanDocumentFragmentNodeRefListBaseProxy.hpp Removed: c/src/xalanc/XPath ResultTreeFragBase.cpp ResultTreeFragBase.hpp Log: Refactored result tree fragments to use XalanDocumentFragment instead of ResultTreeFragBase. This is because the node-set() extension exposes some awkward problems with the implementation. This also simplifies things, so although it changes our XObject interface, in the end, it's much cleaner. Fixes Bugzilla 23778. Revision Changes Path 1.3 +3 -3 xml-xalan/c/src/xalanc/XPath/FunctionID.cpp Index: FunctionID.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/FunctionID.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- FunctionID.cpp 19 Sep 2003 21:05:26 -0000 1.2 +++ FunctionID.cpp 26 Oct 2003 00:41:04 -0000 1.3 @@ -236,8 +236,8 @@ void FunctionID::FunctionIDXObjectTypeCallback::ResultTreeFragment( - const XObject& theXObject, - const ResultTreeFragBase& /* theValue */) + const XObject& theXObject, + const XalanDocumentFragment& /* theValue */) { m_resultString = theXObject.str(); } @@ -247,7 +247,7 @@ void FunctionID::FunctionIDXObjectTypeCallback::ResultTreeFragment( const XObject& theXObject, - ResultTreeFragBase& /* theValue */) + XalanDocumentFragment& /* theValue */) { m_resultString = theXObject.str(); } 1.2 +3 -3 xml-xalan/c/src/xalanc/XPath/FunctionID.hpp Index: FunctionID.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/FunctionID.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FunctionID.hpp 29 Jun 2003 03:58:00 -0000 1.1 +++ FunctionID.hpp 26 Oct 2003 00:41:04 -0000 1.2 @@ -165,13 +165,13 @@ virtual void ResultTreeFragment( - const XObject& theXObject, - const ResultTreeFragBase& /* theValue */); + const XObject& theXObject, + const XalanDocumentFragment& /* theValue */); virtual void ResultTreeFragment( const XObject& theXObject, - ResultTreeFragBase& /* theValue */); + XalanDocumentFragment& /* theValue */); virtual void NodeSet( 1.3 +1 -1 xml-xalan/c/src/xalanc/XPath/XNodeSetBase.cpp Index: XNodeSetBase.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XNodeSetBase.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XNodeSetBase.cpp 19 Sep 2003 21:05:26 -0000 1.2 +++ XNodeSetBase.cpp 26 Oct 2003 00:41:04 -0000 1.3 @@ -232,7 +232,7 @@ -const ResultTreeFragBase& +const XalanDocumentFragment& XNodeSetBase::rtree() const { return m_proxy; 1.3 +1 -1 xml-xalan/c/src/xalanc/XPath/XNodeSetBase.hpp Index: XNodeSetBase.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XNodeSetBase.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XNodeSetBase.hpp 19 Sep 2003 21:05:26 -0000 1.2 +++ XNodeSetBase.hpp 26 Oct 2003 00:41:04 -0000 1.3 @@ -121,7 +121,7 @@ virtual double stringLength() const; - virtual const ResultTreeFragBase& + virtual const XalanDocumentFragment& rtree() const; virtual const NodeRefListBase& 1.3 +3 -23 xml-xalan/c/src/xalanc/XPath/XNodeSetResultTreeFragProxy.cpp Index: XNodeSetResultTreeFragProxy.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XNodeSetResultTreeFragProxy.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XNodeSetResultTreeFragProxy.cpp 19 Sep 2003 21:05:26 -0000 1.2 +++ XNodeSetResultTreeFragProxy.cpp 26 Oct 2003 00:41:04 -0000 1.3 @@ -121,41 +121,21 @@ bool XNodeSetResultTreeFragProxy::hasChildNodes() const { - return getLength() > 0 ? true : false; + return m_value.getLength() > 0 ? true : false; } #if defined(XALAN_NO_COVARIANT_RETURN_TYPE) -ResultTreeFragBase* +XalanDocumentFragment* #else XNodeSetResultTreeFragProxy* #endif XNodeSetResultTreeFragProxy::clone(bool /* deep */) const { - assert(false); + throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR); return 0; -} - - - -XalanNode* -XNodeSetResultTreeFragProxy::item(unsigned int index) const -{ - assert(index < getLength()); - - return m_value.nodeset().item(index); -} - - - -unsigned int -XNodeSetResultTreeFragProxy::getLength() const -{ - assert(unsigned(m_value.getLength()) == m_value.getLength()); - - return unsigned(m_value.getLength()); } 1.3 +1 -9 xml-xalan/c/src/xalanc/XPath/XNodeSetResultTreeFragProxy.hpp Index: XNodeSetResultTreeFragProxy.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XNodeSetResultTreeFragProxy.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XNodeSetResultTreeFragProxy.hpp 19 Sep 2003 21:05:26 -0000 1.2 +++ XNodeSetResultTreeFragProxy.hpp 26 Oct 2003 00:41:04 -0000 1.3 @@ -104,7 +104,7 @@ hasChildNodes() const; #if defined(XALAN_NO_COVARIANT_RETURN_TYPE) - virtual ResultTreeFragBase* + virtual XalanDocumentFragment* #else virtual XNodeSetResultTreeFragProxy* #endif @@ -121,14 +121,6 @@ bool operator==(const XNodeSetResultTreeFragProxy& theRHS); - - // These methods are inherited from XalanNodeList... - - virtual XalanNode* - item(unsigned int index) const; - - virtual unsigned int - getLength() const; // Data members... const XNodeSetBase& m_value; 1.3 +3 -3 xml-xalan/c/src/xalanc/XPath/XObject.cpp Index: XObject.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XObject.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XObject.cpp 19 Sep 2003 21:05:26 -0000 1.2 +++ XObject.cpp 26 Oct 2003 00:41:04 -0000 1.3 @@ -243,16 +243,16 @@ static int foo = 0; -const ResultTreeFragBase& +const XalanDocumentFragment& XObject::rtree() const { throw XObjectInvalidConversionException(getTypeString(), TranscodeFromLocalCodePage("result tree fragment")); // This is just a dummy value to satisfy the compiler. #if defined(XALAN_OLD_STYLE_CASTS) - return (const ResultTreeFragBase&)foo; + return (const XalanDocumentFragment&)foo; #else - return reinterpret_cast(foo); + return reinterpret_cast(foo); #endif } 1.3 +2 -2 xml-xalan/c/src/xalanc/XPath/XObject.hpp Index: XObject.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XObject.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XObject.hpp 19 Sep 2003 21:05:26 -0000 1.2 +++ XObject.hpp 26 Oct 2003 00:41:04 -0000 1.3 @@ -89,7 +89,7 @@ class MutableNodeRefList; class NodeRefListBase; -class ResultTreeFragBase; +class XalanDocumentFragment; class XObjectFactory; class XObjectTypeCallback; class XPathExecutionContext; @@ -225,7 +225,7 @@ * * @return result tree fragment */ - virtual const ResultTreeFragBase& + virtual const XalanDocumentFragment& rtree() const; /** 1.3 +2 -31 xml-xalan/c/src/xalanc/XPath/XObjectResultTreeFragProxy.cpp Index: XObjectResultTreeFragProxy.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XObjectResultTreeFragProxy.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XObjectResultTreeFragProxy.cpp 19 Sep 2003 21:05:26 -0000 1.2 +++ XObjectResultTreeFragProxy.cpp 26 Oct 2003 00:41:04 -0000 1.3 @@ -130,44 +130,15 @@ #if defined(XALAN_NO_COVARIANT_RETURN_TYPE) -ResultTreeFragBase* +XalanDocumentFragment* #else XObjectResultTreeFragProxy* #endif XObjectResultTreeFragProxy::clone(bool /* deep */) const { - assert(false); + throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR); return 0; -} - - - -XalanNode* -XObjectResultTreeFragProxy::item(unsigned int index) const -{ - if (index == 0) - { -#if defined(XALAN_NO_MUTABLE) - return (XalanNode*)&m_proxy; -#else - return &m_proxy; -#endif - } - else - { - assert(false); - - return 0; - } -} - - - -unsigned int -XObjectResultTreeFragProxy::getLength() const -{ - return 1; } 1.3 +3 -11 xml-xalan/c/src/xalanc/XPath/XObjectResultTreeFragProxy.hpp Index: XObjectResultTreeFragProxy.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XObjectResultTreeFragProxy.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XObjectResultTreeFragProxy.hpp 19 Sep 2003 21:05:26 -0000 1.2 +++ XObjectResultTreeFragProxy.hpp 26 Oct 2003 00:41:04 -0000 1.3 @@ -83,7 +83,8 @@ virtual ~XObjectResultTreeFragProxy(); - // These interfaces are inherited from ResultTreeFragBase... + + // These interfaces are inherited from XalanDocumentFragment... virtual XalanNode* getFirstChild() const; @@ -102,7 +103,7 @@ hasChildNodes() const; #if defined(XALAN_NO_COVARIANT_RETURN_TYPE) - virtual ResultTreeFragBase* + virtual XalanDocumentFragment* #else virtual XObjectResultTreeFragProxy* #endif @@ -118,15 +119,6 @@ bool operator==(const XObjectResultTreeFragProxy& theRHS); - - - // These methods are inherited from XalanNodeList... - - virtual XalanNode* - item(unsigned int index) const; - - virtual unsigned int - getLength() const; // Data members... 1.4 +5 -4 xml-xalan/c/src/xalanc/XPath/XObjectResultTreeFragProxyBase.cpp Index: XObjectResultTreeFragProxyBase.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XObjectResultTreeFragProxyBase.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- XObjectResultTreeFragProxyBase.cpp 15 Oct 2003 00:54:59 -0000 1.3 +++ XObjectResultTreeFragProxyBase.cpp 26 Oct 2003 00:41:04 -0000 1.4 @@ -77,8 +77,7 @@ XObjectResultTreeFragProxyBase::XObjectResultTreeFragProxyBase() : - ResultTreeFragBase(), - XalanNodeList() + XalanDocumentFragment() { } @@ -131,7 +130,9 @@ const XalanNodeList* XObjectResultTreeFragProxyBase::getChildNodes() const { - return this; + throw XalanDOMException(XalanDOMException::NOT_SUPPORTED_ERR); + + return 0; } @@ -304,7 +305,7 @@ #if defined(XALAN_NO_COVARIANT_RETURN_TYPE) -ResultTreeFragBase* +XalanDocumentFragment* #else XObjectResultTreeFragProxyBase* #endif 1.4 +4 -13 xml-xalan/c/src/xalanc/XPath/XObjectResultTreeFragProxyBase.hpp Index: XObjectResultTreeFragProxyBase.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XObjectResultTreeFragProxyBase.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- XObjectResultTreeFragProxyBase.hpp 15 Oct 2003 00:54:59 -0000 1.3 +++ XObjectResultTreeFragProxyBase.hpp 26 Oct 2003 00:41:04 -0000 1.4 @@ -65,10 +65,10 @@ #include +#include -#include #include @@ -78,7 +78,7 @@ -class XALAN_XPATH_EXPORT XObjectResultTreeFragProxyBase : public ResultTreeFragBase, private XalanNodeList +class XALAN_XPATH_EXPORT XObjectResultTreeFragProxyBase : public XalanDocumentFragment { public: @@ -88,7 +88,7 @@ ~XObjectResultTreeFragProxyBase(); - // These interfaces are inherited from ResultTreeFragBase... + // These interfaces are inherited from XalanDocumentFragment... virtual const XalanDOMString& getNodeName() const; @@ -179,7 +179,7 @@ getIndex() const; #if defined(XALAN_NO_COVARIANT_RETURN_TYPE) - virtual ResultTreeFragBase* + virtual XalanDocumentFragment* #else virtual XObjectResultTreeFragProxyBase* #endif @@ -197,15 +197,6 @@ bool operator==(const XObjectResultTreeFragProxyBase& theRHS); - - - // These methods are inherited from XalanNodeList... - - virtual XalanNode* - item(unsigned int index) const = 0; - - virtual unsigned int - getLength() const = 0; // Data members... 1.3 +5 -5 xml-xalan/c/src/xalanc/XPath/XObjectTypeCallback.hpp Index: XObjectTypeCallback.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XObjectTypeCallback.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XObjectTypeCallback.hpp 19 Sep 2003 21:05:26 -0000 1.2 +++ XObjectTypeCallback.hpp 26 Oct 2003 00:41:04 -0000 1.3 @@ -76,7 +76,7 @@ class MutableNodeRefList; class NodeRefListBase; -class ResultTreeFragBase; +class XalanDocumentFragment; class XObject; @@ -136,7 +136,7 @@ */ virtual void ResultTreeFragment(const XObject& theXObject, - const ResultTreeFragBase& theValue) = 0; + const XalanDocumentFragment& theValue) = 0; /** * Call back the XObject with a result tree fragment value. @@ -145,8 +145,8 @@ * @param theValue */ virtual void - ResultTreeFragment(const XObject& theXObject, - ResultTreeFragBase& theValue) = 0; + ResultTreeFragment(const XObject& theXObject, + XalanDocumentFragment& theValue) = 0; /** * Call back the XObject with a node set value. @@ -165,7 +165,7 @@ * @param theValue */ virtual void - Unknown(const XObject& theObject, + Unknown(const XObject& theObject, const XalanDOMString& theName) = 0; /** 1.4 +0 -1 xml-xalan/c/src/xalanc/XPath/XPathExecutionContext.hpp Index: XPathExecutionContext.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XPathExecutionContext.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- XPathExecutionContext.hpp 19 Sep 2003 21:05:26 -0000 1.3 +++ XPathExecutionContext.hpp 26 Oct 2003 00:41:04 -0000 1.4 @@ -81,7 +81,6 @@ #include -#include 1.3 +1 -1 xml-xalan/c/src/xalanc/XPath/XStringBase.cpp Index: XStringBase.cpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XStringBase.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XStringBase.cpp 19 Sep 2003 21:05:26 -0000 1.2 +++ XStringBase.cpp 26 Oct 2003 00:41:04 -0000 1.3 @@ -135,7 +135,7 @@ -const ResultTreeFragBase& +const XalanDocumentFragment& XStringBase::rtree() const { return m_resultTreeFrag; 1.3 +1 -1 xml-xalan/c/src/xalanc/XPath/XStringBase.hpp Index: XStringBase.hpp =================================================================== RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XStringBase.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XStringBase.hpp 17 Jul 2003 17:57:25 -0000 1.2 +++ XStringBase.hpp 26 Oct 2003 00:41:04 -0000 1.3 @@ -129,7 +129,7 @@ virtual double stringLength() const = 0; - virtual const ResultTreeFragBase& + virtual const XalanDocumentFragment& rtree() const; virtual void 1.1 xml-xalan/c/src/xalanc/XPath/XalanDocumentFragmentNodeRefListBaseProxy.cpp Index: XalanDocumentFragmentNodeRefListBaseProxy.cpp =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Xalan" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation and was * originally based on software copyright (c) 1999, International * Business Machines, Inc., http://www.ibm.com. For more * information on the Apache Software Foundation, please see * . */ #include "XalanDocumentFragmentNodeRefListBaseProxy.hpp" #include #include XALAN_CPP_NAMESPACE_BEGIN XalanDocumentFragmentNodeRefListBaseProxy::XalanDocumentFragmentNodeRefListBaseProxy(const XalanDocumentFragment& value) : NodeRefListBase(), m_value(value) { } XalanDocumentFragmentNodeRefListBaseProxy::XalanDocumentFragmentNodeRefListBaseProxy(const XalanDocumentFragmentNodeRefListBaseProxy& source) : NodeRefListBase(), m_value(source.m_value) { } XalanDocumentFragmentNodeRefListBaseProxy::~XalanDocumentFragmentNodeRefListBaseProxy() { } XalanNode* #if defined(NDEBUG) XalanDocumentFragmentNodeRefListBaseProxy::item(size_type) const #else XalanDocumentFragmentNodeRefListBaseProxy::item(size_type index) const #endif { assert(index == 0); #if defined(XALAN_OLD_STYLE_CASTS) return (XalanDocumentFragment*)&m_value; #else return const_cast(&m_value); #endif } XalanDocumentFragmentNodeRefListBaseProxy::size_type XalanDocumentFragmentNodeRefListBaseProxy::getLength() const { return 1; } XalanDocumentFragmentNodeRefListBaseProxy::size_type XalanDocumentFragmentNodeRefListBaseProxy::indexOf(const XalanNode* theNode) const { return theNode == &m_value ? 0 : npos; } XALAN_CPP_NAMESPACE_END 1.1 xml-xalan/c/src/xalanc/XPath/XalanDocumentFragmentNodeRefListBaseProxy.hpp Index: XalanDocumentFragmentNodeRefListBaseProxy.hpp =================================================================== /* * The Apache Software License, Version 1.1 * * * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Xalan" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation and was * originally based on software copyright (c) 1999, International * Business Machines, Inc., http://www.ibm.com. For more * information on the Apache Software Foundation, please see * . */ #if !defined(XALANDOCUMENTFRAGMENTNODEREFLISTBASEPROXY_HEADER_GUARD_1357924680) #define XALANDOCUMENTFRAGMENTNODEREFLISTBASEPROXY_HEADER_GUARD_1357924680 // Base header file. Must be first. #include // Base class header file. #include XALAN_CPP_NAMESPACE_BEGIN class XalanDocumentFragment; class XALAN_XPATH_EXPORT XalanDocumentFragmentNodeRefListBaseProxy : public NodeRefListBase { public: /** * Construct an instance from a document fragment * * @param value source document fragment. */ XalanDocumentFragmentNodeRefListBaseProxy(const XalanDocumentFragment& value); /** * Copy constructor * * @param source source instance */ XalanDocumentFragmentNodeRefListBaseProxy(const XalanDocumentFragmentNodeRefListBaseProxy& source); virtual ~XalanDocumentFragmentNodeRefListBaseProxy(); // These methods are inherited from NodeRefListBase... XalanNode* item(size_type index) const; size_type getLength() const; size_type indexOf(const XalanNode* theNode) const; private: // Data members... const XalanDocumentFragment& m_value; }; XALAN_CPP_NAMESPACE_END #endif // XALANDOCUMENTFRAGMENTNODEREFLISTBASEPROXY_HEADER_GUARD_1357924680 --------------------------------------------------------------------- To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: xalan-cvs-help@xml.apache.org