00001 #ifndef ParentNode_HEADER_GUARD_
00002 #define ParentNode_HEADER_GUARD_
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 
00054 
00055 
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00100 
00101 #include <util/XercesDefs.hpp>
00102 #include "ChildNode.hpp"
00103 
00104 class  ParentNode: public ChildNode {
00105 public:
00106     DocumentImpl            *ownerDocument; 
00107 
00108     ChildNode                *firstChild;
00109 
00110 public:
00111     ParentNode(DocumentImpl *ownerDocument);
00112     ParentNode(const ParentNode &other);
00113 
00114     virtual DocumentImpl * getOwnerDocument();
00115     virtual void setOwnerDocument(DocumentImpl *doc);
00116 
00117     virtual NodeListImpl *getChildNodes();
00118     virtual NodeImpl * getFirstChild();
00119     virtual NodeImpl * getLastChild();
00120     virtual unsigned int getLength();
00121     virtual bool        hasChildNodes();
00122     virtual NodeImpl    *insertBefore(NodeImpl *newChild, NodeImpl *refChild);
00123     virtual NodeImpl    *item(unsigned int index);
00124     virtual NodeImpl    * removeChild(NodeImpl *oldChild);
00125     virtual NodeImpl    *replaceChild(NodeImpl *newChild, NodeImpl *oldChild);
00126     virtual void        setReadOnly(bool isReadOnly, bool deep);
00127 
00128     
00129     virtual void    normalize();
00130 
00131     
00132     
00133     virtual DocumentImpl * getDocument();
00134 protected:
00135     void cloneChildren(const NodeImpl &other);
00136     ChildNode * lastChild();
00137     void lastChild(ChildNode *);
00138 
00140     int fCachedLength;
00141 
00143     ChildNode * fCachedChild;
00144 
00146     int fCachedChildIndex;
00147 };
00148 
00149 #endif