Main Page   Class Hierarchy   Compound List   File List   Compound Members  

IDParentNode.hpp

00001 #ifndef IDParentNode_HEADER_GUARD_
00002 #define IDParentNode_HEADER_GUARD_
00003 
00004 
00005 /*
00006  * The Apache Software License, Version 1.1
00007  *
00008  * Copyright (c) 2001 The Apache Software Foundation.  All rights
00009  * reserved.
00010  *
00011  * Redistribution and use in source and binary forms, with or without
00012  * modification, are permitted provided that the following conditions
00013  * are met:
00014  *
00015  * 1. Redistributions of source code must retain the above copyright
00016  *    notice, this list of conditions and the following disclaimer.
00017  *
00018  * 2. Redistributions in binary form must reproduce the above copyright
00019  *    notice, this list of conditions and the following disclaimer in
00020  *    the documentation and/or other materials provided with the
00021  *    distribution.
00022  *
00023  * 3. The end-user documentation included with the redistribution,
00024  *    if any, must include the following acknowledgment:
00025  *       "This product includes software developed by the
00026  *        Apache Software Foundation (http://www.apache.org/)."
00027  *    Alternately, this acknowledgment may appear in the software itself,
00028  *    if and wherever such third-party acknowledgments normally appear.
00029  *
00030  * 4. The names "Xerces" and "Apache Software Foundation" must
00031  *    not be used to endorse or promote products derived from this
00032  *    software without prior written permission. For written
00033  *    permission, please contact apache\@apache.org.
00034  *
00035  * 5. Products derived from this software may not be called "Apache",
00036  *    nor may "Apache" appear in their name, without prior written
00037  *    permission of the Apache Software Foundation.
00038  *
00039  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
00040  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00041  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00042  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
00043  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00044  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00045  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
00046  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00047  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00048  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00049  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00050  * SUCH DAMAGE.
00051  * ====================================================================
00052  *
00053  * This software consists of voluntary contributions made by many
00054  * individuals on behalf of the Apache Software Foundation, and was
00055  * originally based on software copyright (c) 2001, International
00056  * Business Machines, Inc., http://www.ibm.com .  For more information
00057  * on the Apache Software Foundation, please see
00058  * <http://www.apache.org/>.
00059  */
00060 
00061 //
00062 //  This file is part of the internal implementation of the C++ XML DOM.
00063 //  It should NOT be included or used directly by application programs.
00064 //
00065 //  Applications should include the file <dom/DOM.hpp> for the entire
00066 //  DOM API, or DOM_*.hpp for individual DOM classes, where the class
00067 //  name is substituded for the *.
00068 //
00069 
00070 /*
00071  * $Id: IDParentNode.hpp,v 1.1 2002/05/11 20:15:46 bhavani Exp $
00072  */
00073 
00085 #include <xercesc/util/XercesDefs.hpp>
00086 #include "IDNodeListImpl.hpp"
00087 
00088 class IDChildNode;
00089 class IDOM_Document;
00090 class IDOM_Node;
00091 class IDOM_NodeList;
00092 
00093 class CDOM_EXPORT IDParentNode  {
00094 public:
00095     IDOM_Document            *fOwnerDocument; // Document this node belongs to
00096     IDOM_Node                *fFirstChild;
00097     IDNodeListImpl            fChildNodeList;      // for GetChildNodes()
00098 
00099 public:
00100     IDParentNode(IDOM_Document *ownerDocument);
00101     IDParentNode(const IDParentNode &other);
00102 
00103     IDOM_Document * getOwnerDocument() const;
00104     void setOwnerDocument(IDOM_Document* doc);
00105 
00106     // Track changes to the node tree structure under this node.  An optimization
00107     //   for NodeLists.
00108     int changes() const;
00109     void changed();
00110 
00111     IDOM_Node     * appendChild(IDOM_Node *newChild);
00112     IDOM_NodeList * getChildNodes() const;
00113     IDOM_Node     * getFirstChild() const;
00114     IDOM_Node     * getLastChild() const;
00115     unsigned int    getLength() const;
00116     bool            hasChildNodes() const;
00117     IDOM_Node     * insertBefore(IDOM_Node *newChild, IDOM_Node *refChild);
00118     IDOM_Node     * item(unsigned int index) const;
00119     IDOM_Node     * removeChild(IDOM_Node *oldChild);
00120     IDOM_Node     * replaceChild(IDOM_Node *newChild, IDOM_Node *oldChild);
00121 
00122     //Introduced in DOM Level 2
00123     void        normalize();
00124 
00125     // NON-DOM
00126     // unlike getOwnerDocument this never returns null, even for Document nodes
00127     IDOM_Document * getDocument() const;
00128 
00129 
00130 public:
00131     void cloneChildren(const IDOM_Node *other);
00132     IDOM_Node * lastChild() const;
00133     void lastChild(IDOM_Node *);
00134 };
00135 
00136 #endif

Generated on Tue Nov 19 09:36:31 2002 by doxygen1.3-rc1